Skip to content

fix(openclaw-id): linked claw no longer mints new keys when its key files are lost - #196380

Merged
jalehman merged 6 commits into
mainfrom
fix/ocid-key-loss-local-only
Nov 10, 2026
Merged

jalehman merged 6 commits into
mainfrom
fix/ocid-key-loss-local-only

Conversation

@jalehman

@jalehman jalehman commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Related: #196138 (re-bind design, "Key files at every start")

What Problem This Solves

Fixes: a linked claw silently creates a new endpoint key or Gateway key when its key file is lost (disk loss, a restore that skipped openclaw-id/, an accidental delete), then publishes and signs under keys its owner-signed server binding does not name, which strands every device.

User Impact

User impact: when a linked claw's key file is missing or holds a different key, OpenClaw ID remote access stays off with status keys_refused (key: endpoint | gateway, reason: keys_missing | key_mismatch). Nothing is created, published, signed or dialed with another key. The Gateway itself keeps running, so everything on the machine works as before. Restoring the original key file brings remote access back. The way to move a claw to new keys (openclaw id rebind) follows in a stacked PR. Unlinked Gateways create keys exactly as before.

Why This Change Was Made

Once a claw is linked, its stored binding is the only record of which K_srv and K_gw are current. At every start the Gateway (for K_gw) and the tunnel child (for K_srv, via expectedEndpointKey in its start message) use the key file only when its seed derives the bound public key. Otherwise they promote a staged <file>.next only if its seed derives the bound key, so a planted file is never used, and if neither matches they refuse. The re-bind uses that .next promotion to finish an interrupted commit. The child exits with new codes 76/75, which the supervisor does not retry. The Gateway never reads the K_srv file.

Owner decision for this fix: the Gateway is not blocked from starting, and nothing in startup or Doctor treats this state as fatal.

Notes for reviewers
  • claw-name-check.ts and service-gateway-key.ts are extracted from service.ts (max-lines). Name-check behavior is unchanged, and the lifetime signal is still captured on admission.
  • The tunnel child's K_srv requirement survives authority withdrawn after an uncertain store write. It keeps the last bound K_srv rather than falling back to the unlinked "create" start (from the independent review).
  • Test fixtures: linkedClaw() now writes its K_gw seed into a per-claw state dir. Several existing tests relied on the bug, because the Gateway minted a key for a linked claw.

Evidence

  • Real Gateway (src/gateway/server.openclaw-id-keys.test.ts). A linked claw with gateway.key gone returns keys_refused/gateway/keys_missing, with no key files created and health still answering. With endpoint.key gone, the real tunnel child returns keys_refused/endpoint/keys_missing and creates no key. Both fail on main (status on, keys minted).
  • Real tunnel child: it serves on the bound key and promotes a staged key the binding names. This shows the Ed25519 seed→pubkey derivation equals iroh's endpoint id.
  • Service: K_gw missing or mismatched means no fetch, no file, and publish() → failed keys_missing. A local membership change is still accepted and stays pending for publication. Red on main.
  • Key rule matrix (keyfile.test.ts): match, staged match, missing, mismatch, and a planted staged key that is not promoted. Supervisor: 76/75 are not retried.
  • Withdrawn-authority restart regression: red without the fix, green with it.
  • Link-commit regression: a Gateway that starts unlinked and links, then has its authority withdrawn by an uncertain write before any child restart reads the binding. The restart getter still returns the committed K_srv. Red without the fix, green with it (ClawSweeper P2/security).
  • Recovery copy (log lines and docs/concepts/experimental-features.md): restore the original key files, then restart the Gateway. After a refusal the supervisor does not retry, so restoring the file alone does not bring remote access back (ClawSweeper P2).
  • linkedClaw key directories are tracked and removed after each test file (ClawSweeper P3).
  • Still open: runtime proof with an isolated Gateway and a stable-upgrade check. These run with the staging live proof.
  • src/gateway/openclaw-id suite green, plus tsgo:core, tsgo:ui, oxlint and format. Inherited failure: server.auth.openclaw-id-node-host.test.ts "both streaming transfer routes use the same private bridge" fails identically on main in this environment.

Initial-link uncertain settlement correction

a71dce7 addresses the new current-head P2: the initial link may be durable even when its acknowledgement and reconciliation read both fail. The service now retains the supervisor-reported running K_srv before awaiting link settlement, rather than only after a successful return. It does not trust caller-supplied binding data or restore withdrawn authority. A readable binding still wins; a refused link attempt conservatively retains the already-running endpoint constraint for that process. Fresh unlinked startups remain unchanged.

The existing withdrawn-authority regression now covers both the initial-link and later-write cases. The initial case verifies the persisted binding, withdrawn authority and endpoint constraint delivered to the next child start. It fails on 3c40bfb (getter returns undefined) and passes with this change. Focused service/keyfile/name/real-Gateway lost-key suites: 5 files, 20/20 tests. Core typecheck, targeted type-aware lint, format, diff check and the test-lines ratchet pass. Fresh independent source review found no P0–P2 findings. The test matrix reuses the existing fixture; production repair moves one assignment before settlement without introducing another owner or state field.

This regression reads the real service's restart-key getter with the native child mocked. The sibling real-Gateway tests exercise both lost key files, but the exact uncertain-initial-link path through an isolated real tunnel and stable upgrade is still an explicit proof gap, not claimed complete here. No deployment or merge.

Integrated staging acceptance and final cleanup — November 10

This closes the earlier pending same-claw staging run, not exact-head hosted CI or every PR-specific test gap. The isolated Gateway used combined source f864514d93a08efda68c14eabc42768f081af854; the repaired registered CLI used f08fea43c6979223ebf44f8b05020dd3033414ea. These are integrated proof refs, not the individual PR heads.

  • Actual Control UI rotation 1→2 committed and published, preserving the root and admitted native node (studio-ui-rebind-v4-call-result.json).
  • The earlier CLI 2→3 committed but reported failure; that defect remains recorded above/in feat(openclaw-id): move a claw to new keys with its recovery kit (openclaw id rebind) #196388. A deliberately new repaired CLI 3→4 exited 0, reported moved:true/published:true, and authenticated readback confirmed binding/published 4. Root, two owner certificates and membership remained intact (studio-cli4-owner-follow-call-result.json).
  • The same persistent remote owner browser and saved native node followed 3→4 and reconnected after a separate actual Gateway restart. Production SQLite trust load showed pin/freshness 4 before native dialing; system.which(uname) passed (studio-cli4-restart-call-result.json). This does not retroactively prove owner-browser following of each earlier rotation.
  • Actual native transport with copied real node trust refused a signed snapshot claiming binding 4 under verified binding 3 as snapshot_ahead, without advancing pin/freshness or connecting. This used an isolated signed HTTP fixture, not a malicious write to staging (studio-snapshot-ahead-native-result.json).
  • Production readStoredClaw/publishClaw used real old binding-3 SQLite and keys against staging: HTTP 409 stale_binding carried binding 4, verified under the root, producing non-retryable binding_superseded. Current-key authentication succeeded before/after; current Gateway/native/owner recovery then passed. This is persisted-state/publisher integration, not a full old-Gateway boot (studio-rollback3-publisher-result.json, studio-post-rollback4-recovery-call-result.json).
  • Final exact-claw retirement completed once; database checks showed no claw/member/relay-key rows and a reserved retired hostname. Independent existing-owner authentication obtained descriptor 404. Owned processes/listeners/transports were absent; private Studio/fsn1 profiles, snapshots, keys and kit copies were removed, with tracked checkouts clean. The original lock holder exited 0, the same canonical lock was verified available, and four reservation-owner release notices were queued. No merge or production deployment occurred.

Shipped older-writer limitation: the remotely verified latest stable v2026.11.2 and beta v2026.11.5-beta.1 examined here contain neither src/gateway/openclaw-id nor packages/openclaw-id-protocol. A compatible shipped writer was not available in that bounded set, so a shipped-writer upgrade was not executed and cannot be claimed. This is not an exhaustive statement about every historical release. See shipped-old-writer-feasibility.json.

Evidence files above are operator-local under /tmp/ocid-rollout-evidence/, not downloadable GitHub attachments. Final receipts: studio-final-retirement-descriptor-result.json, studio-final-cleanup-result.json, studio-final-private-state-cleanup-result.json, studio-final-lock-release-result.json; full run chronology: studio-harness-integration-audit.md.

For #196380 specifically, this combined run does not newly prove the exact uncertain-initial-link failure through a real tunnel; its existing focused regression and stated scope remain unchanged.

Current-main CI comparison and clean rebase — November 10

The prior UI failure is not classified as inherited. The latest scheduled main run 42844215728, at da0190f377a8384223fca256990dae0a2bff2678, passed the exact chat-transcript-end-follow.browser.test.ts case preserves clamp intent (settled, at end: true, movement: 8, before clamp: true) in 409 ms (job). Newer main push runs skipped this UI lane; their success is not test-execution evidence. The PR was therefore rebased without conflicts onto pinned current main b21829a4c85fb685888538b3bc1369bfb5b36bd4, producing 8d20985e878b4eef195e040ea0fef6425536566d. The complete PR patch has unchanged stable patch ID 5081067f0443cbe4937af751d3392ecd95d1bf1a; git diff --check passes. The accepted independent full-PR review remains source-applicable; prior-head CI and integrated runtime proof retain their actual tested identities. New-head hosted CI is pending, not claimed green.

The test-line failure is inherited budget debt, not an unallocated PR increase. Counts use the repository ratchet's literal LF-byte patterns and existing allocation; no ceiling or allocation was changed:

Snapshot Test lines Effective ceiling Debt
Prior CI base baccc7e1 6,618,377 6,618,307 70
Prior CI candidate 6,618,835 6,618,765 70
Current pinned main b21829a4 6,629,553 6,629,533 20
Rebased PR 8d20985e 6,630,011 6,629,991 20

In both comparisons, PR test growth +458 = existing allocation +458, so the PR adds no debt. Running node --import ./scripts/tsx.mjs scripts/check-test-lines-ratchet.mts --base b21829a4c85fb685888538b3bc1369bfb5b36bd4 --no-merge-base on the rebased PR exits 1 with total 6,630,011, ceiling 6,629,991, overage 20 and net delta +458. This is an evidenced failure, not a waiver or passing gate. Local receipts: pr196380-budget-current-main.json and pr196380-rebased-test-lines.log. No merge or production deployment is authorized by this evidence update.

Inspectable runtime evidence — November 10

The excerpts below supersede the earlier pending real-child proof note. Values are selected from retained terminal/JSON receipts; keys, IPs, tokens, emails, node/claw identifiers, private paths and non-public endpoints are omitted. Historical integrated runs retain their original revisions. No retired staging claw was recreated, and no personal profile was used.

Existing live run: bound signing and endpoint success

Combined Gateway source: f864514d93a08efda68c14eabc42768f081af854. These are historical integrated-run observations, not a fresh exact-head deployment.

Selected studio-rollback3-publisher-result.json → remote.publisher fields:

{
  "passed": true,
  "currentKeyAuthenticatedBefore": true,
  "currentKeyAuthenticatedAfter": true,
  "publishedBindingUnchanged": true,
  "databaseWorkersClosed": true
}

The retained request sequence has HTTP statuses 200 → 409 → 200: current-key authentication, stale binding-3 publication refusal, current-key authentication again. Production readStoredClaw/publishClaw were used; the refusal was binding_superseded, retryable:false, and the returned current binding was root-verified. This shows current-key signing/authentication succeeds while the retired publisher fails; it is not a full old-Gateway boot.

Selected studio-cli4-restart-call-result.json fields:

{
  "passed": true,
  "bindingSeq": 4,
  "publishedBindingSeq": 4,
  "nativePersisted4": true,
  "sameNativeNodeReconnected": true,
  "harmlessCommand": true,
  "sameOwnerReconnected": true,
  "bindingUnchanged": true,
  "cleanupConfirmed": true
}

Before reconnect, the verifier loaded the real node's production SQLite config and asserted persisted binding-4 evidence's k_srv and k_gw equal the live Gateway's binding. Readback additionally confirms the persisted pin and keyed snapshot marker name that same k_gw. The saved native node then completed its real transport connection and system.which request after a distinct Gateway process restart; the persistent owner browser also reconnected. This is end-to-end bound-key success, not a standalone claim that a protocol-only signature check opened a native endpoint.

New exact-head local run: real child refuses mismatched current/staged keys before IP I/O

Source: 8d20985e878b4eef195e040ea0fef6425536566d. Production resolveRuntimeProcessEntrypointUrl("openclawIdTunnel"), resolveRuntimeWorkerArgv, tunnel-child/entry.ts and the real loadIrohBinding() addon were used. No mock child or mocked native binding. Loaded addon SHA-256: 570ef4e7323a24b5afa373ec24abda7e89c7cee89367aef1333d7fa8e1d7d7e2 (the observed binary, not an assertion about a reproducible rebuild).

Redacted terminal output:

{"mode":"current","result":"passed","exitCode":75,"readyMessages":0}
{"mode":"staged","result":"passed","exitCode":76,"readyMessages":0}
  • Current-file case: a valid but different seed is present; binding names another key. Exit 75 (key_mismatch), original file unchanged, no ready message.
  • Staged-only case: current key is absent and a valid but nonmatching .next seed is present. Exit 76 (keys_missing), staged file unchanged, no promotion/current-key creation, no ready message.
  • Each run used a fresh private state directory and loopback-only fixture addresses. strace -f -e trace=network captured parent and native child threads. Zero AF_INET/AF_INET6 syscall lines in each complete trace; the captured network calls are local IPC, not IP tunnel I/O.
New exact-head local run: uncertain initial-link persistence followed by a real native child restart

Same exact source and native binary as above. The production service, authority, tunnel runtime, supervisor and native child ran unchanged. Only persistence was fault-injected through the authority's store interface: write the JSON record to the throwaway profile, then throw the acknowledgement error; the reconciliation read also throws. This is a real on-disk write with injected acknowledgement/read failure, not a SQLite crash/durability qualification or full Gateway-process restart. Unrelated membership side effects were inert fixture callbacks.

Procedure: start genuinely unlinked; let the native child bind and report its running endpoint; create valid owner-signed initial-link statements for that endpoint; call production service.commitLink; observe the persisted binding and withdrawn authority; place nonmatching current and staged seeds in the isolated profile; kill only the owned native child; let the unchanged production supervisor restart it.

Redacted terminal output:

{
  "mode": "uncertain",
  "result": "passed",
  "persistedBindingMatchesRunningKey": true,
  "authorityWithdrawn": true,
  "failedAcks": 1,
  "failedReads": 1,
  "restartStatus": {"state":"keys_refused","key":"endpoint","reason":"key_mismatch"},
  "readyCount": 1,
  "wrongKeyNotAdopted": true
}

strace -f -e trace=network,process saw two real child execs. Descendant threads were attributed through traced clone/fork edges:

Phase Process/thread count AF_INET/AF_INET6 syscall lines
Initial native bind (positive control) 39 69
Restart after uncertain write 37 0

The initial child's successful ready event is the only ready event. The restarted child exits at key refusal, does not bind another endpoint, and leaves the planted key unchanged. The authority remains withdrawn; the service's retained running-key constraint is what prevents an unlinked start. Owned service/children were stopped at run end; product source and historical proof refs were not changed.

Older shipped-writer upgrade: not applicable to these unshipped paths. No compatible shipped writer is available for this feature; the bounded stable/beta inspection above is the verified release evidence, not a fabricated shipped-upgrade run. Preview-writer SQLite migration is being qualified separately under #196402.

Exact-head CI is terminal, with inherited debt

CI run 42854952850 completed for head 8d20985e878b4eef195e040ea0fef6425536566d. The only root failure is test-line budget; openclaw/ci-gate reports that failure. The other CI jobs, including UI, are terminal without a failure.

CI used base 53aed90ae4c7522f5dae79c6b6d6cb4f0fccf551, merge d8b78d23d0604a63aad29642abd6346131571ef2. Its log reports:

Test lines: 6631480; ceiling: 6631460; over by: 20; net delta: +458.

Independent LF-byte recount of that exact base: 6,631,022 lines / 6,631,002 ceiling = 20 debt. The PR contributes +458 lines / +458 existing allocation, preserving the same debt. No budget adjustment, waiver or green-CI claim. Hosted reassessment and explicit merge authorization remain required.

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: L labels Nov 10, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR prevents linked OpenClaw ID Gateways from replacing missing or mismatched machine keys and permits promotion only of staged keys named by their binding.

Example: A linked Gateway restarts after openclaw-id/endpoint.key is deleted.

  • Before: The tunnel creates a new endpoint identity that existing devices do not recognize.
  • After: Remote access reports keys_refused/endpoint/keys_missing, creates no replacement key, and local Gateway access remains available.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported repair with real runtime proof and no open findings; inherited CI debt remains a landing concern.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Public redacted output maps bound-key signing and reconnect success to the historical integrated Gateway revision, and exact-head production child launches reject mismatched current/staged keys before IP I/O; a production service/supervisor/native-child run also rejects an unbound key after uncertain initial-link persistence withdraws authority.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Losing a linked claw’s machine-key files silently replaces its identity and strands its remote devices.
Reason: The maintainer-directed repair preserves the existing signed identity contract, keeps local operation available, and leaves recovery to the separately scoped rebind work.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current-main identity bug, and the updated runtime evidence resolves the previous proof blocker; no new correctness findings remain, but the required CI gate is still red.

Priority: P2
Reviewed head: 8d20985e878b4eef195e040ea0fef6425536566d

Before merge

None.

Findings

None.

Agent review details

How this fits together

The OpenClaw ID service reads the persisted owner-signed binding, supplies its endpoint constraint to the supervised tunnel child, and uses its Gateway-key constraint for Discovery signing.

flowchart TD
  A[Stored signed binding] --> B[OpenClaw ID service]
  B --> C[Gateway key loader]
  B --> D[Tunnel supervisor]
  D --> E[Native tunnel child]
  C --> F[Bound key selection]
  E --> F
  F --> G[Use matching key or refuse]
Loading

Technical review

Best possible solution:

Land the bound-key selection and restart constraint after the inherited CI gate is handled through the repository’s landing policy.

Do we have a high-confidence way to reproduce the issue?

Current-main source creates missing keys without checking the stored binding, and the supplied regression evidence reports both lost-key Gateway cases failing on main; this review executed no target code.

Is this the best way to solve the issue?

The patch restores the binding invariant in the existing shared key loader and service, with justified extractions and a single retained endpoint constraint rather than a competing authority owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ecbad2efa1d7.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +278, Tests +458, Docs +8, Other +2. Total +746 across 24 files. Added test files: 3.

View PR surface stats
Area Files Added Removed Net
Source 11 390 112 +278
Tests 11 492 34 +458
Docs 1 9 1 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 24 893 147 +746

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The bug strands remote devices after machine-key loss on an opt-in Labs surface while local Gateway access continues.
  • merge-risk: 🚨 security-boundary: The patch changes credential selection before signing and native endpoint binding; inspected runtime evidence covers bound-key success and rejection of unbound keys, including uncertain-write restart.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (4 earlier review cycles)
  • reviewed 2026-11-10T02:01:55.523Z sha 557a35c :: needs real behavior proof before merge. :: [P2] Remember the endpoint binding when the claw becomes linked | [P2] Include the restart step in lost-key recovery instructions | [P2] Allocate the justified regression-test growth | [P3] Clean up temporary key directories created by linkedClaw
  • reviewed 2026-11-10T02:56:10.340Z sha 4b64971 :: needs real behavior proof before merge. :: [P2] Remember the endpoint binding when the claw becomes linked | [P2] Include the restart step in lost-key recovery instructions | [P3] Clean up temporary key directories created by linkedClaw
  • reviewed 2026-11-10T06:49:15.514Z sha 3c40bfb :: needs real behavior proof before merge. :: [P2] Preserve the endpoint constraint when the initial link write is uncertain
  • reviewed 2026-11-10T16:10:35.736Z sha a71dce7 :: needs real behavior proof before merge. :: none

Reviewed November 10, 2026, 12:00 PM ET / 17:00 UTC (Revision 5).

@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 10, 2026
@jalehman
jalehman force-pushed the fix/ocid-key-loss-local-only branch from e2e8df5 to 3c40bfb Compare November 10, 2026 05:48
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
…iles are lost (openclaw#196380)

* fix(openclaw-id): keep a linked claw off its lost keys instead of minting new ones

A linked claw's stored binding now names the only K_srv and K_gw it may use.
When a key file is missing or holds another key, remote access stays off with
keys_missing or key_mismatch, nothing is created, published or dialed with
another key, and the Gateway keeps running for local use. A staged .next key
is promoted only when its seed derives the bound key.

* fix(openclaw-id): restart the tunnel child on the bound key while authority is withdrawn

* test(openclaw-id): allocate test lines for the lost-key regressions

* test(openclaw-id): size the lost-key test-line allocation to the change's growth

* fix(openclaw-id): remember the K_srv a link commits for child restarts

A Gateway that starts unlinked never read a binding, so if the authority was
withdrawn after linking, before any restart read it, the next child start was
the unlinked one. Recovery copy now says to restart after restoring the key
files, and linkedClaw's key directories are removed after each test file.

* fix(openclaw-id): constrain endpoint identity before initial link settlement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant