Repository navigation
fix(apple): follow an OpenClaw ID re-bind; J5 binding_seq cap; re-verify on redial - #196445
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
jalehman
force-pushed
the
fix/ocid-apple-rebind-trust
branch
from
November 10, 2026 08:30
0fa1bb0 to
e32d769
Compare
This was referenced Nov 10, 2026
jalehman
force-pushed
the
fix/ocid-apple-rebind-trust
branch
from
November 10, 2026 15:06
e32d769 to
7b4134a
Compare
2 of 18 tasks
jalehman
force-pushed
the
fix/ocid-apple-rebind-trust
branch
from
November 10, 2026 17:35
7b4134a to
fa8e9be
Compare
jalehman
force-pushed
the
fix/ocid-apple-rebind-trust
branch
2 times, most recently
from
November 10, 2026 20:44
7cec6bd to
d44a165
Compare
jalehman
force-pushed
the
openclaw-517/node-apple
branch
from
November 10, 2026 20:44
7c97d92 to
f7d7aec
Compare
jalehman
force-pushed
the
fix/ocid-apple-rebind-trust
branch
4 times, most recently
from
November 12, 2026 10:03
fdc88a4 to
5960801
Compare
…se binding_seq (J5) Snapshot order is kept per K_gw, so a re-bind's new key is not refused as a replay, and a commit under a new key needs a newer verified binding. A snapshot naming a binding_seq beyond its verified binding is refused and only the binding's pin advance is kept; a keyless stored row is capped at the pin and loses its order on load. The tunnel re-verifies K_srv before every dial.
… key K_srv refreshes from reconnects and liveness probes run one at a time, in commit order. A dial whose key a newer refresh replaced is closed instead of installed, and a probe that verifies a newer key retires the active connection.
…erseded A refused server-key refresh may already have pinned a newer binding, so it now clears the published key and retires any active connection; a pending dial to the previous key can no longer install. A close from a superseded key no longer marks the node removed and disables the replacement binding.
jalehman
force-pushed
the
fix/ocid-apple-rebind-trust
branch
from
November 12, 2026 10:38
5960801 to
6058cf0
Compare
jalehman
marked this pull request as ready for review
November 12, 2026 10:39
…y ignore Re-bind verification now constructs trust state in-module, so the initializer is used.
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 13, 2026
…ify on redial (openclaw#196445) * fix(apple): follow an OpenClaw ID re-bind; only verified bindings raise binding_seq (J5) Snapshot order is kept per K_gw, so a re-bind's new key is not refused as a replay, and a commit under a new key needs a newer verified binding. A snapshot naming a binding_seq beyond its verified binding is refused and only the binding's pin advance is kept; a keyless stored row is capped at the pin and loses its order on load. The tunnel re-verifies K_srv before every dial. * test(apple): expect the retired binding's refusal from assess itself * fix(apple): never keep or install a connection to a superseded server key K_srv refreshes from reconnects and liveness probes run one at a time, in commit order. A dial whose key a newer refresh replaced is closed instead of installed, and a probe that verifies a newer key retires the active connection. * fix(openclaw-id): retain the first verified Apple binding pin on snapshot refusal * fix(openclaw-id): let every Apple stream caller join verified connection installation * test: isolate Apple rebind state and document keyed trust * style(apple): normalize rebind Swift formatting * fix(apple): revoke stale tunnel keys when a refresh is refused or superseded A refused server-key refresh may already have pinned a newer binding, so it now clears the published key and retires any active connection; a pending dial to the previous key can no longer install. A close from a superseded key no longer marks the node removed and disables the replacement binding. * chore(apple): drop the trust state initializer's superfluous Periphery ignore Re-bind verification now constructs trust state in-module, so the initializer is used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #194201 (Apple OpenClaw ID node foundation, landed as
5fdbae53e443), #196402 (protocol: clients follow a re-bind), #196759 (Mac enrollment app wiring, stacked on this)What Problem This Solves
Apple nodes on the OpenClaw ID foundation stop connecting after an owner uses "Move to new keys": the replacement key's snapshots are refused as replays, and the tunnel keeps dialing the original server key. A retired Gateway signing key can also inflate a snapshot's binding number and lock the node out.
User Impact
No user-visible change on its own; this is the shared foundation that app wiring (#196759) uses. Once wired, an Apple node follows a Gateway re-bind and reconnects to the new server key without a new invite, and a retired or compromised Gateway signing key can no longer lock it out or keep receiving its traffic.
Migration note: this amends the unshipped
apple-node-enrollments-v1schema in place (nullablesnapshot_gateway_keyonopenclaw_id_node_targets). Pre-release development stores must be recreated and the node re-enrolled; nothing is reset automatically.Why This Change Was Made
Ports the re-bind rules from #196402 into the Swift node:
binding_seqexceeds the verified root-signed binding is refused without retaining any of its facts. The root-verified binding pin is still saved, but no dial route is stored. (feat(apple): add opt-in OpenClaw ID node foundation #194201 now carries the same cap for its own code.)Accepted tradeoff: after keyless order is discarded, an otherwise valid older snapshot can pass within the existing ≤3-hour freshness window until a keyed marker is stored.
Evidence
Head
66b36c047d4f, rebased ontomainafter #194201 landed as5fdbae53e443, plus one comment-only commit dropping a Periphery ignore that became superfluous (the trust state initializer is now used in-module). The 8 restacked commits are patch-identical to the previously tested head (diff of diffs empty), whose Swift sources and tests matched the Mac-proven heade33a97b4ffc0; between those heads the only changes are comment lines (Periphery ignore commands) and a CI workflow line inherited from #194201. The first 7 commits match the earlier headd44a16557b1f; the 8th fixes two findings from this pass's review (below).sandbox-execwith network, the real home directory, Keychain/preferences IPC,launchctlandopendenied. SharedOpenClawIDNodesuites 39/39 passed, five consecutive runs; macOS bridge suites 20/20 passed. Tested source and test file hashes match this head's tree. No installed app, Keychain or profile was touched.927e83b) with the new tests, both fail in three consecutive runs. A refused refresh revokes a pending dial to the previous key: the old dial installed and returned a stream. A superseded key cannot report the node removed: the tunnel shut down with.removed. Both pass with the fix. The removal test holds the old dial's admission timer, so it cannot pass via the timer path.927e83breported one P1 (a refused refresh left the old key installable) and one P2 (a superseded key could mark the node removed). Both were verified in source and fixed. A delta re-review found no production defects in the fix. It flagged one test-strength issue (the removal test could pass on a timer race), which is now fixed and re-proven red/green. The review also confirmed the feat(apple): add opt-in OpenClaw ID node foundation #194201 binding-cap gap is closed, including persistence and reopen.apple-node-nativeworkflow and broad CI are linked in this head's checks.Live evidence
Signed Personal Team build 2611000399 ran on a Mac Studio on 2026-11-11 against a real Gateway over OpenClaw ID. It included this PR's earlier head as part of #196759, plus fixes from #197421 (now in #197585) and the macOS packaging fix #197383 (
f817a8b). It showed enrollment via invite and owner approval, keys in the Keychain, relaunch with the same node identity, a tunnel connection (relay, then direct) and the dashboard proxy.Limits: no re-bind was performed on a real device, so this PR's main behavior has no live evidence. The build predates the last commit here and includes changes outside this PR. Also not covered: sleep/wake, network change, in-place app update, TCC prompts, Intel Macs, iOS.
Known gaps
OpenClawIDNodeEnrollmentTestsis larger here.