Skip to content

feat(openclaw-id): define accountless node enrollment - #193980

Merged
jalehman merged 6 commits into
mainfrom
openclaw-517/node-protocol
Nov 8, 2026
Merged

jalehman merged 6 commits into
mainfrom
openclaw-517/node-protocol

Conversation

@jalehman

@jalehman jalehman commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Related: #192352

What Problem This Solves

Headless nodes need an accountless, owner-approved identity and bootstrap contract before they can reach a claw through the OpenClaw ID relay and tunnel.

User Impact

This PR defines the protocol layer only; it does not yet enable node connectivity in the running product. Nodes get a separate W-only key class, never owner or member privileges. All changes revise the unshipped v1-draft in place.

Stack dependency: this now targets main. Gateway, Discovery and node-host consumers follow in the implementation stack. A minimal existing Gateway consumer repair refuses accountless member-redemption mail with audience_mismatch through the normal settlement/acknowledgment path; valid member handling is unchanged. Test fixtures initialize the new empty draft state and preserve their concrete human-sender types. Persisted-state initialization and snapshot re-signing are included at the startup migration boundary. Full node dispatch and runtime connectivity remain in the following stack.

Why This Change Was Made

  • Owner-signed NodeInviteCap plus a proof key registers directly at the Gateway. W-signed NodeRedemption proves the invite and becomes pending, admitting nothing.
  • Owner/R-signed add_node and remove_node, denial and peer revocation use the existing membership authority. Nodes have listing seqs, limits, inactivity clocks and pairing-cleanup events; snapshots carry node_peer_keys.
  • W-signed bearerless Discovery requests can only mail a node redemption before admission; verified admitted nodes can read the descriptor and snapshot. Relay admission includes the new snapshot list.
  • Strict fragment-only join links contain only the invite and claw pin/routing fields. --discovery-url (or deployment configuration) supplies the separate Discovery origin; clients never infer it from the hostname/relay and never weaken pin verification.

The simplification pass reused owner verification, sequences, invite proof-key derivation, retention, strict schema combinators and signature transport. Node-specific lifetime enforcement leaves member policy unchanged. This remains a protocol stage: Gateway/UI/runtime enforcement follows in the stack.

The owner-reviewed flow now includes a shared six-digit nodeVerificationCode bound to the claw, invite, W and signed NodeDescription. The terminal and dialog show the same code; the owner compares it and explicitly clicks Approve. Opening the dialog never approves automatically. The signed description declares display name, platform, commands and caps under strict size/count limits; it is retained with pending and approved nodes, but is not standalone authority. First-connect command/capability auto-approval is bounded to subsets of what the owner approved; additions use normal capability approval. Node invite creators default to 10 minutes; registration enforces a strict one-hour maximum.

Evidence

  • pnpm install --frozen-lockfile: independent physical worktree install passed; donor checkout unchanged.
  • pnpm test packages/openclaw-id-protocol --maxWorkers=1: 169 tests / 25 files passed after the owner-approval UX additions (4.03s Vitest, 7.38s wrapper).
  • Targeted strict tsgo of the protocol public barrel and affected protocol tests, plus canonical pnpm tsgo:core: passed.
  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json packages/openclaw-id-protocol/src: passed, 67 files.
  • Package-config boundary lint also passed (66 files) after successful declaration emission; the original Gateway consumer type error is resolved.
  • Package format check, docs MDX check, changed-source line-cap ratchet and staged whitespace check: passed.
  • Test-line allocation: 565 = original 436 + exactly 40 mailbox regression lines + exactly 89 net description/code/lifetime test lines. Two fixture initialization lines use existing slack; the shared scalar is unchanged. The allocation protects forgery/class-separation and bootstrap boundaries, not test-volume growth for its own sake.
  • Existing claw-store and member-profile persistence tests: 8 tests / 2 files passed (89.99s Vitest including 67.5s one-time worker preparation; 96.21s wrapper).
  • Mailbox reader: 6 tests passed; new regression failed before the guard and passed after it. Existing callback/acknowledgment tests remain green. Final run: 86.19s Vitest including 80.55s one-time worker preparation, 94.02s wrapper; regression itself 7ms. CI timing is not yet available.
  • Deterministic v1-draft JSON regenerated from the vector builder; fixtures test byte-for-byte agreement.
  • Independent read-only review found one P2 (Discovery origin absent from link bootstrap). Verified and resolved through the explicit configured-origin/default-and-override contract, preserving the requested link fields. No other verified P0–P2 findings in the original review. A follow-up review of the small consumer repair completed but its result was unavailable; publication proceeds with coordinator approval on the original review and passing affected checks.

Fresh independent read-only review of the UX delta found no verified P0–P2 findings and independently reproduced code vector 168017. Canonical production types and strict package types (including tests), lint, format, MDX, line caps, test allocation and whitespace checks passed.

Protocol boundary coverage includes forged/wrong-key and mailbox approval refusal, pending-only redemption, owner capability/sequence checks, node/human key separation in both directions, limits, denial, removal events, revocation replay, inactivity, strict links and W-signed request path binding. Deployed Gateway/Discovery enforcement and real tunnel traffic remain named integration gates for the following stack, not claims made by these tests.

Stack conflict repair: rebased onto 90a2c765e10799dce65c5cffc2539b878a46f71a, preserving both the base’s signed protocols and this change’s node_peer_keys snapshot fields. Regenerated deterministic vectors; protocol suite, canonical production typecheck, test-line ratchet and whitespace checks passed again. The range-diff contains only the combined snapshot schema context and regenerated signatures.

Combined independent Astra review at 30d3f15ac8bec96419d9641ffb76a587de3ded41: no verified P0–P2 findings. This closes the earlier missing-review gap by covering the accountless member-mail refusal together with all UX additions. Source inspection traced refusal settlement, subsequent-message processing, acknowledgment and cursor persistence; human redemption behavior is unchanged. The reviewer also independently reproduced code 168017. Existing passing test/type/lint evidence was reused, not rerun by the reviewer. No code changes were required.

Vendor portability follow-up at 84d94f697987e0ed145f7edb3be0edd257080d59: replaced URLSearchParams.keys() iteration with forEach pair counting; the existing exactly-once known-field checks still reject duplicates and unknown keys. Added tsconfig.portable.json and its documented command, checking package source with ES2023 + DOM and no Node ambient types or DOM.Iterable. ES2022 alone fails on pre-existing Array.toSorted usage; no unrelated array behavior was changed. The local compiler includes iterable DOM declarations, so Discovery/loader vendor builds remain the final consumer-compiler gate. All 169 protocol tests, portable types, focused lint, 7-file MDX check, format, source line cap and whitespace checks passed. Independent Astra review found no verified P0–P2 findings and confirmed equivalent parser guards across 43 cases. Test allocation remains 565 (no new test lines).

November 6 stack rebase

Replayed only the three owned protocol/UX/portability commits onto rewritten base 8f6b45814afd1a3aa6b241a4908ec6c0d7b6504a. New head: 5eb5e40cdfa31e691fae575a1bd792bc3d9c1758. Retained the base RootReset types, strict validation, verifier and vectors alongside the node contracts; snapshots retain both protocols and node_peer_keys. Regenerated signed fixtures with buildStatementVectors. Protocol suite: 187 tests / 26 files passed; portable typecheck and pnpm tsgo:core passed. Focused lint, seven-file MDX check, formatting and whitespace checks passed. Independent Astra conflict-resolution review found no verified P0–P2 findings and verified preservation of base reset/pin vectors and original feature vectors. Pushed using an exact expected-head lease on 84d94f697987e0ed145f7edb3be0edd257080d59. No downstream branches changed.

November 7 main landing candidate

Head c2a19d6ce7125afa2c3622c38441fc55d6102742, rebased onto main f8b1a6ba3d8d7a29fd44529fa3833229e61f6261; protocol remains v1-draft revised in place. Base approval-subtree restrictions and loader code-delivery trust assumptions are retained. Signed vectors regenerated with the canonical builder (no final byte changes).

Fresh independent Astra/high full review found one P1: previously persisted linked claws lacked the new unsigned node collections, breaking normal owner reconnect and snapshot publication. Fixed at the existing startup migration boundary before authority is exposed; preserves membership, listing sequences, signed binding/certificates, initializes only missing maps and schedules a newly signed snapshot. Regression reproduced the exact isNode TypeError before the fix and passes afterward. Independent correction review cleared the P1 with no new verified P0–P2 findings.

Validation: protocol 196 tests / 27 files passed; Gateway OCID consumers 251 passed, 10 skipped / 44 files; UI protocol consumers 24 / 5 files passed. After the migration correction, migration/authority/publisher/persistence siblings 30 / 4 files passed. Portable ES2023+DOM typecheck, canonical pnpm tsgo:core (rerun after repair), scoped lint, formatting, seven-document MDX and whitespace checks passed. Test-line ratchet has 30 lines slack with the allocation unchanged; source line-cap ratchet passed for 28 changed source files. Discovery deployment, node runtime/transport/UI and full live tunnel proof remain downstream; the new regression exercises Gateway authority load and local snapshot construction, not live Discovery publication. No main or child branches changed.

PR is ready at d6f0b8f; hosted CI for this head completed successfully (run 42388517226). No inherited failure exception is claimed. Prior native preparation was at c2a19d6; review guard and artifacts for the comment-only correction are validated at this exact head (zero findings). No merge has been submitted. The coordinator withdrew the native-CLI merge route: this lane will stop after CI evidence and handoff; Josh will perform the final squash or name an approved writer.

CI correction (comment-only)

Run 42387608117 at c2a19d6ce7125afa2c3622c38441fc55d6102742 completed with a PR-caused checks-fast-baseline-ratchets failure: the existing node-key SAFETY comment in authority/allowlist.ts was above the chain instead of adjacent to the assertion. This is not an inherited failure. Commit d6f0b8f7c9b2d594a44c524adbe52aeec294071b moves only that comment, without changing executable code. The exact assertion-safety ratchet reproduced red before and passed after; formatting and diff whitespace passed. Existing independent behavior review and focused tests apply to unchanged executable code; new hosted CI completed successfully as recorded below.

Final CI handoff — November 7

Exact head and pre-squash restacking anchor: d6f0b8f7c9b2d594a44c524adbe52aeec294071b on openclaw-517/node-protocol. Hosted CI run 42388517226 completed successfully at this head, including checks-fast-baseline-ratchets and openclaw/ci-gate. The current combined openclaw/ci-gate, dependency-review and security-sensitive-review statuses are SUCCESS (gate publication). No inherited failures or exception are claimed. One older PR-context run was cancelled; its successor completed successfully.

Exact-head review artifacts validated with zero findings; the earlier independent behavioral review remains applicable because the final correction only repositions an existing comment. Prior native preparation remains recorded at c2a19d6ce7125afa2c3622c38441fc55d6102742, not the final head. This lane has no merge authority and has submitted no merge request. Merge remains blocked on an approved writer: Josh handles the final squash or names an approved route. Downstream owners should restack from the full anchor above after the squash; no child branches were changed.

Review repair and cross-stack evidence — November 8

Current head and restacking anchor: a1038c7f22c6a92f2fb705df5e3adb4f6b7464f0. This supersedes the previous final-CI handoff above; that green CI belongs to the prior head. Hosted CI for this head passed: 61 checks passing, 0 failing, 0 pending. Eight earlier failures were GitHub API rate limit exceeded for installation errors in scan/security API steps (opengrep itself reported 0 findings), not PR-caused; all passed on rerun (OpenGrep attempt 3, CodeQL Critical Quality attempt 3, CodeQL attempt 2). No merge or child-branch mutation is authorized.

  • P2 mailbox settlement fixed: unimplemented node_redemption now produces an explicit unsupported refusal through normal settlement before acknowledgment and cursor persistence. All unhandled kinds use the same fail-closed fallback; neither redemption nor authority submission is invoked. This restores the original mailbox dispatch/settlement intent. Reader-boundary regression reproduced zero refusal callbacks on the old code and passes after repair. Final mailbox/authority run: 16 tests / 2 files passed, 11.23s Vitest / 18.14s wrapper; node regression 5ms. Core types, focused lint, formatting, assertion-safety and test-line gates, MDX and whitespace checks passed. New allocation records exactly 69 regression lines.
  • P1 existing-claw compatibility proven: valid signed state generated using base f8b1a6ba3d8d7a29fd44529fa3833229e61f6261 protocol APIs was saved through the unchanged SQLite writer without node maps. Two separate real source-Gateway processes proved startup/cold restart, readiness 200, authenticated status/People RPCs, owner/operator-member resolution, inactive-key maintenance, expired-invite sweeping, durable map initialization, preserved signed credentials, and cryptographically verified snapshots delivered to a local HTTP mirror. Both exited cleanly. Minimal isolated source Gateway, not an installed stable-release upgrade or model/channel test.
  • Stage authority distinction: offline-prepared valid pending node state can be approved through root-signed mailbox statements or direct owner-signed RPCs and enter signed snapshots. Owner-device mailbox approval is refused not_direct; approval without pending redemption is refused invite_not_pending. This PR is not a blanket prohibition on node authority writes. The consuming Gateway still resolves no node principal, omits W from its tunnel allowlist, rejects token fallback with openclaw_id_not_admitted, and creates no pairing.
  • Composed-stack production-path proof: Gateway feat(openclaw-id): admit nodes over the tunnel with owner-approved pairing #194001 at 4fc18ce33e9763b25f01c7ece2f1643c6de10634 plus node-host feat(node-host): connect nodes over the OpenClaw ID tunnel #193982 at 5771dc00ae185442c456c6899c015cc31e6eb058, composed only in a detached proof checkout. Real Gateway service, SQLite, native iroh child, private ingress and node candidate passed: approved W reaches hello-ok with node-only pairing; pending/foreign/revoked W are denied before ingress, Gateway requests or pairing mutations; operator escalation/owner API/token fallback denied; live revocation closes transport and removes pairing. 1 composition test passed, 7.579s test / 30.17s wrapper. These enforcement owners are the downstream PRs, not feat(openclaw-id): define accountless node enrollment #193980 alone. Local QUIC only; no hosted relay or CLI enrollment claim.
  • Descriptor disclosure proof: Discovery #6, exact 96927c6ee6955ed8061ee344700f169ca0cc1e16, test/nodes.test.ts re-run locally: 13/13 passed, 5.66s. Local Worker/D1 tests verify identical descriptor 403 for unknown/pending/removed/foreign and owner/member-only W, bearer-owner 401, and revalidation of stored signature/claw/binding/signer. Approved current node receives descriptor. Unmerged, undeployed test evidence, not live staging or the composed-stack descriptor route.
  • Independent review: Astra/high reviewed the narrow delta from d6f0b8f7c9b2d594a44c524adbe52aeec294071b to this repair: no P0–P2 findings. Local ClawSweeper checkout was dirty; autoreview helper failed authentication, so no successful helper review is claimed. Hosted ClawSweeper re-review at this head resolved both earlier findings and reported no new findings.

Retained finding / limitation: during startup/mailbox overlap, an accepted root approval reached authority seq 5 while the publication receipt remained seq 4 with publish_pending:false after a 90-second observation. A deterministic owner-level reproduction demonstrates a compatible lost-request window in publication-retry.ts around awaiting setPending(false). The publication owner is unchanged from the PR base, but identical baseline runtime failure has not been established; this is not an inherited-CI exception or a claim of successful automatic convergence. Recovery reconciled accepted writes without replay, restarted and explicitly published a verified seq-6 snapshot containing both nodes. The narrow mailbox repair does not fix this separate publication finding. It is fixed separately in #195261, now merged to main as dec19a6acb83e8a961d2df5a4ec7e1d53d88171b (red/green regression against the production retry owner; deterministic reproduction now publishes [1, 2]). This PR does not touch publication-retry.ts.

Inspectable proof output — November 8

Sanitized terminal output from the runs summarized above. Synthetic state only; no addresses, keys, credentials, private endpoints or phone numbers. Raw logs and state stay private.

Existing-claw upgrade, cold restart and stage-authority proof (source Gateway, PR head a1038c7; base fixture from f8b1a6b)

The Error: expected startup publication was not produced line and the publication-late-request-reproduction result are the publication lost-request finding fixed in #195261. The final node consumer proof restarted confirmed state without replaying either approval. tunnel.state: unavailable is expected: the native iroh binding was not built for this run, so it makes no QUIC/relay claim.

{"proof":"base-fixture","base":"f8b1a6ba3d8d7a29fd44529fa3833229e61f6261","seq":3,"owners":1,"members":2,"invites":1,"nodesPresent":false,"nodeInvitesPresent":false,"baseWriterIdenticalToHead":true}
[openclaw-id] dropped 1 device key(s) unused too long
PROOF_RESULT {"proof":"upgrade","pid":3815324,"gatewayStarted":true,"startupSettled":true,"httpReadyStatus":200,"rpcStatus":{"state":"on","tunnel":{"state":"unavailable","reason":"iroh transport is unavailable on this platform","retryInMs":60000}},"ownerResolved":"owner","memberResolved":"member","memberRole":"operator","inactiveMemberResolved":null,"nodeCollectionsInitialized":true,"signedOwnerCertUnchanged":true,"signedBindingUnchanged":true,"expiredInviteSwept":true,"snapshotPublished":true,"snapshotSignatureVerified":true,"nodePeerCount":0,"seq":4,"descriptorCount":4,"snapshotCount":4}
PROOF_CLEANUP {"gatewayCloseSettled":true,"mirrorClosed":true,"portClaimReleased":true,"pid":3815324}
PROOF_RESULT {"proof":"restart","pid":3818725,"gatewayStarted":true,"startupSettled":true,"httpReadyStatus":200,"rpcStatus":{"state":"on","tunnel":{"state":"unavailable","reason":"iroh transport is unavailable on this platform","retryInMs":60000}},"ownerResolved":"owner","memberResolved":"member","memberRole":"operator","inactiveMemberResolved":null,"nodeCollectionsInitialized":true,"signedOwnerCertUnchanged":true,"signedBindingUnchanged":true,"expiredInviteSwept":true,"snapshotPublished":true,"snapshotSignatureVerified":true,"nodePeerCount":0,"seq":4,"descriptorCount":2,"snapshotCount":2}
PROOF_CLEANUP {"gatewayCloseSettled":true,"mirrorClosed":true,"portClaimReleased":true,"pid":3818725}
{"proof":"node-stage-preconditions","pendingNodes":2,"preapprovalAdmitted":false,"ownerSignedMailbox":"not_direct","rootSignedWithoutPending":"invite_not_pending","rootSignedWithPending":"applied","note":"pending node state constructed through real protocol APIs offline; Gateway node registration/redemption integration is absent"}
[openclaw-id] mailbox root_statement refused (not_direct)
PROOF_CLEANUP {"gatewayCloseSettled":true,"mirrorClosed":true,"portClaimReleased":true,"pid":3823427}
Error: expected startup publication was not produced
{"proof":"publication-late-request-reproduction","currentSeq":2,"publishedSeqs":[1],"publishPending":false,"requestAcceptedWhilePriorSuccessClearedPending":true,"result":"newer request was not republished"}

Final node consumer proof
PROOF_RESULT {"proof":"node-recovery","pid":3829765,"gatewayStarted":true,"startupSettled":true,"httpReadyStatus":200,"rpcStatus":{"state":"on","tunnel":{"state":"unavailable","reason":"iroh transport is unavailable on this platform","retryInMs":60000}},"ownerResolved":"owner","memberResolved":"member","memberRole":"operator","inactiveMemberResolved":null,"nodeCollectionsInitialized":true,"signedOwnerCertUnchanged":true,"signedBindingUnchanged":true,"expiredInviteSwept":true,"snapshotPublished":true,"snapshotSignatureVerified":true,"nodePeerCount":2,"seq":6,"descriptorCount":2,"snapshotCount":2,"node":{"pendingDevicePairings":0,"pairedDevices":0,"listedGatewayNodes":0,"ownerDirectApproval":"previous-boot-confirmed-from-disk","rootMailboxApproval":"previous-boot-confirmed-from-disk","protocolAdmitted":true,"snapshotListsW":true,"gatewayPrincipal":null,"gatewayTunnelPushIncludesW":false,"httpAuthWithCorrectGatewayToken":{"ok":false,"reason":"openclaw_id_not_admitted"},"addedBy":"root","mailboxCursor":"proof-mail-cursor"}}
PROOF_CLEANUP {"gatewayCloseSettled":true,"mirrorClosed":true,"portClaimReleased":true,"pid":3829765}
Composed-stack final-effect proof (Gateway #194001 4fc18ce33e9763b25f01c7ece2f1643c6de10634 + node host #193982 5771dc00ae185442c456c6899c015cc31e6eb058, common ancestor d6f0b8f7c9b2d594a44c524adbe52aeec294071b)

Real Gateway OCID service, SQLite authority/pairing stores, supervised native iroh tunnel child, private ingress and node host, over local direct QUIC. *Effects: 0 means no private-ingress request, no Gateway HTTP/WS request or upgrade, and no pairing-store change after the admission attempt.

{"phase":"setup","nativeBinding":true,"gatewayService":"production","authorityStore":"SQLite","ownerRpc":true}
{"case":"pending","tunnel":"terminal_not_admitted","ingressEffects":0,"gatewayEffects":0,"pairingEffects":0}
{"case":"foreign","tunnel":"terminal_not_admitted","ingressEffects":0,"gatewayEffects":0,"pairingEffects":0}
{"case":"approved","tunnel":"admitted","gateway":"hello-ok","pairing":"openclaw-id-node","roles":["node"],"scopes":[],"commands":["system.run"]}
{"case":"node-privilege-escalation","ownerTokenPresented":true,"operatorConnect":"rejected","ownerApi":403,"operatorHttp":401,"cookiesIssued":false,"pairingEffects":0}
{"case":"revoke-live-approved","nativeConnection":"terminal_revoked","pairing":"removed"}
{"case":"revoked-reconnect","tunnel":"terminal_not_admitted","ingressEffects":0,"gatewayEffects":0,"pairingEffects":0}
{"phase":"cleanup","clientsStopped":true,"transportsClosed":true,"gatewayClosed":true}
{"testFilesPassed":1,"testsPassed":1,"caseTestMs":7579,"vitestSeconds":26.08,"wrapperSeconds":30.17,"exitCode":0}

Descriptor disclosure: Discovery #6 at 96927c6ee6955ed8061ee344700f169ca0cc1e16, npm test -- test/nodes.test.ts: 13/13 passed (local Worker/D1 tests of an unmerged, undeployed PR).

Rollout: coordinated cutover with Discovery and the loader

node_peer_keys is a required field of the signed MembershipSnapshot, and the Gateway always publishes it (empty when there are no nodes). Every strict v1-draft consumer rejects both unknown and missing fields, so this is a hard cutover, the same treatment the earlier protocols field received. This PR lands together with two companion PRs, each vendoring this PR's protocol at exactly a1038c7f22c6a92f2fb705df5e3adb4f6b7464f0 (written by each repository's scripts/sync-protocol.mjs; vendored src verified identical to this commit):

  • openclaw/discovery#6 at f377f33c4ca9: rebased onto Discovery main, mergeable and clean. Full suite and typecheck pass; PR CI test passed and deploy was skipped. No D1 migration or configuration change.
  • openclaw/claw-loader#10 at 9de6778f7a90: no loader source changes needed; fixtures now sign new-shape snapshots, and a new end-to-end test enrolls a recovery kit against a snapshot that lists a node key. Unit tests 108/108; PR CI test passed and deploy was skipped. The five local Playwright failures also fail identically on loader main.

Sequence: merge this PR, then Discovery#6 and claw-loader#10 (each deploys to staging on push to main), then update Labs Gateways. Between the Discovery deploy and a Gateway's update, that Gateway's snapshot publications are refused and its existing relay entry remains; node access fails closed until a new-shape snapshot is published. Rollback reverts all three and requires Gateways to republish old-shape snapshots.

@clawsweeper

clawsweeper Bot commented Nov 6, 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 scripts Repository scripts agents Agent runtime and tooling size: XL labels Nov 6, 2026
@jalehman
jalehman force-pushed the openclaw-517/node-protocol branch from 50f4ce3 to 7d63dc5 Compare November 6, 2026 05:38
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts agents Agent runtime and tooling labels Nov 6, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. 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:feature Preliminary submission classification; full source review pending. labels Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR defines accountless node invitations, owner-approved node membership, signed Discovery contracts, and enrollment links.

Example: Enroll a Linux node named Build node declaring system.run and compare verification code 168017.

  • Before: The protocol has no separate accountless node enrollment contract.
  • After: A signed redemption becomes pending, and explicit owner approval lists its key with node-only authority.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent protocol stage with substantive production-path proof, repaired prior findings, preserved existing state, and an explicitly accepted draft rollout contract.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Exact-head source-Gateway terminal output shows preserved credentials, initialized durable maps, verified snapshots, cold restart, accepted signed approval, and no node principal or pairing at this stage. The separately identified Gateway and node-host composition demonstrates approved node-only hello, zero ingress/Gateway/pairing effects for pending, foreign, and revoked keys, rejected privilege escalation, and live transport revocation with pairing removal. This resolves both previous rank-up requests; local QUIC evidence makes no hosted-relay or complete enrollment claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Headless nodes need owner-approved remote access without an account or shared Gateway credential.
Reason: The maintainer-authored direction establishes a distinct node identity class and a reviewable protocol stage without claiming complete runtime enrollment.

Merge readiness

✅ Ready for maintainer review

This maintainer-authored PR is a useful, coherent protocol stage with no remaining correctness findings; the newly published traces resolve the previous proof blockers.

Priority: P2
Reviewed head: a1038c7f22c6a92f2fb705df5e3adb4f6b7464f0

Before merge

None.

Findings

None.

Agent review details

How this fits together

The portable protocol package validates signed invitations and membership changes, produces authority state and signed-snapshot bodies, and leaves persistence, transport admission, and pairing effects to Gateway and Discovery consumers.

flowchart LR
  Owner[Owner device or recovery kit] --> Authority[Protocol authority]
  Node[Headless node] --> Redemption[Signed redemption]
  Redemption --> Authority
  Authority --> Pending[Pending approval]
  Pending --> Authority
  Authority --> Snapshot[Signed membership snapshot]
  Snapshot --> Consumers[Gateway and Discovery consumers]
Loading

Technical review

Best possible solution:

Land this bounded protocol stage using the recorded coordinated consumer cutover, with runtime connectivity delivered by the downstream stack.

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

This is a protocol feature; the supplied exact-head Gateway output demonstrates the repaired migration and stage authority behavior without executing target code during this review.

Is this the best way to solve the issue?

The change is a coherent first stage that reuses existing signature verification, membership sequencing, retention, and persistence owners while keeping runtime enrollment with its consumers.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Owner verification and membership changes keeps the original intent (ed57ed7: The shared protocol package centralizes signed statements and current membership authority; later delegated-owner repairs preserve approval ancestry and capability limits.)
  • Revocation and invite retention keeps the original intent (0809cf3: Listing sequences prevent captured revocations from removing reapproved devices, while bounded invitations avoid unbounded persisted history.)
  • Strict signed snapshot shape changes intended behavior with a stated reason (55787b3: Signed protocol-version advertisements required coordinated draft consumers; this PR explains the same deliberate cutover for node_peer_keys.)
  • Gateway authority loading and mailbox settlement keeps the original intent (428ca7d: The Labs Gateway owns durable membership and verifies mailbox statements before effects and acknowledgment; migration and explicit unsupported settlement preserve that ownership.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Raw commit ed57ed7 adds packages/openclaw-id-protocol/src/statements/verify.ts:119 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ed57ed752e35; files: packages/openclaw-id-protocol/src/statements/verify.ts)

PR surface

Source +960, Tests +662, Docs +259, Config +11, Other +4. Total +1896 across 39 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 20 1027 67 +960
Tests 9 675 13 +662
Docs 7 267 8 +259
Config 1 11 0 +11
Generated 0 0 0 0
Other 2 4 0 +4
Total 39 1984 88 +1896

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.

Review metrics

Metric Value Why it matters
Wire contract expansion 2 statement types, 2 membership operations, 2 Discovery endpoints, 1 required snapshot field These additions form the bounded enrollment contract and explain the coordinated draft-consumer cutover.

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: This is a useful Labs protocol feature with limited immediate runtime impact.
  • merge-risk: 🚨 compatibility: Required node_peer_keys changes strict signed snapshot parsing; the maintainer explicitly accepts the documented coordinated cutover.
  • merge-risk: 🚨 security-boundary: The change introduces node authority and admission contracts; supplied final-effect traces cover forbidden principals, escalation, and revocation.
  • 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 (2 earlier review cycles)
  • reviewed 2026-11-06T06:08:11.931Z sha 84d94f6 :: needs real behavior proof before merge. :: [P1] [P1] Initialize node maps when loading an existing claw | [P2] [P2] Settle node mail explicitly before acknowledging it
  • reviewed 2026-11-08T04:46:56.987Z sha a1038c7 :: needs real behavior proof before merge. :: none

Reviewed November 8, 2026, 11:31 AM ET / 16:31 UTC (Revision 3).

@jalehman
jalehman force-pushed the openclaw-id/pr-ui-people branch 2 times, most recently from 57baf78 to 8f6b458 Compare November 6, 2026 07:39
@jalehman
jalehman force-pushed the openclaw-517/node-protocol branch from 84d94f6 to 5eb5e40 Compare November 6, 2026 13:52
@jalehman
jalehman force-pushed the openclaw-id/pr-ui-people branch 4 times, most recently from dfa0d58 to 8751edc Compare November 6, 2026 18:15
@jalehman
jalehman force-pushed the openclaw-517/node-protocol branch from 5eb5e40 to c2a19d6 Compare November 7, 2026 15:37
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation app: web-ui App: web-ui scripts Repository scripts agents Agent runtime and tooling labels Nov 7, 2026
@jalehman
jalehman marked this pull request as ready for review November 7, 2026 15:41
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: a1038c7f22c6a92f2fb705df5e3adb4f6b7464f0
  • Maintainer: @jalehman
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/openclaw-id/authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@jalehman

jalehman commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. label Nov 8, 2026
@jalehman

jalehman commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Nov 8, 2026
@jalehman
jalehman merged commit 2198d6f into main Nov 8, 2026
187 of 197 checks passed
@jalehman
jalehman deleted the openclaw-517/node-protocol branch November 8, 2026 16:46
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. security-sensitive-changed 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