Repository navigation
Conversation
A membership change replay fails once its sequence moves. A revocation has no sequence, so a captured statement removed an owner device or browser again after a later approval. The revocation now has to be at least as new as the current certificate, or as the time the browser was added. The allowlist suite covers a mailbox replay after re-approval. Signed-off-by: Sebastien Tardif <[email protected]>
|
🦞👀 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. |
Signed-off-by: Sebastien Tardif <[email protected]>
The merged tree is over the test-line ceiling, so any added test line fails. The re-approval replay stays, and the allowlist cap cases now share one case. Signed-off-by: Sebastien Tardif <[email protected]>
|
Codex review: needs real behavior proof before merge. What this changesThis PR remembers successfully applied revocation signatures so replaying one cannot remove a subsequently approved device. Example: device-1 revokes device-2, approves device-2 again, and the original signed revocation arrives through the mailbox again.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it addresses a source-confirmed replay defect still present on main, and the previous test-placement finding is resolved; lifetime signature retention needs the protocol owner's decision. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe private OpenClaw ID protocol package verifies signed membership writes and returns in-memory authority state plus events; Gateway consumers own persistence, admission, disconnection, and token invalidation. flowchart LR
A[Signed membership writes] --> B[Schema and current signer verification]
B --> C[Revocation signature ledger]
C --> D[Allowlist transition]
D --> E[Returned authority state]
D --> F[Gateway effect events]
Technical reviewBest possible solution: Keep replay deduplication in the existing authority owner, with an approved signature-lifetime contract and demonstrated access enforcement. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the sequence: revoke device-2, approve the same key again, then resubmit the original signature while its signer remains authorized; current main removes device-2 again, although no reproduction was executed during this read-only review. Is this the best way to solve the issue? Signature deduplication repairs the existing authority operation without competing policy or unreliable clock ordering, preserves cascade removal, and leaves only the ledger-lifetime choice to its owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 206d54934a3d. Provenance checked
TestingProof path: unit tests only. SecurityNeeds attention: Current-signer verification remains intact, but replay suppression changes the authority contract governing device removal. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +108, Tests -10, Docs +13. Total +111 across 8 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 3, 2026, 6:00 PM ET / 23:00 UTC (Revision 5). |
A peer-key revocation of a still-current owner removes every device that owner approved, including one with a newer certificate. A browser approval is the signed issued_at of the add, so a revocation from that same clock still disconnects the browser when the Gateway clock is ahead. Signed-off-by: Sebastien Tardif <[email protected]>
The assertion-safety ratchet counts a type assertion unless the SAFETY comment is on the line above it. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review CI is green on d9b7375. This head fixes the two blocked paths from the review of b72755e. A peer-key revocation of a still-current owner removes the full approval cascade, including a descendant with a newer certificate. A browser approval time is the signed issued_at of the add, so a revocation from that clock still applies when the Gateway clock is ahead. The type assertion has its SAFETY comment on the line above it. |
|
🦞👀 Re-review progress:
|
A certificate signed within the allowed skew can be newer than a revocation from another device. That must not veto a fresh signature. The bytes that already removed a key are remembered, so a replay cannot delete a later approval, and a new signature still revokes. The owner-device, member, and browser cap cases and the idle member browser case are back, with a test-line allocation for the growth. Signed-off-by: Sebastien Tardif <[email protected]>
The merged tree is already over the test-line ceiling, so any added test lines fail that ratchet. Drop the allocation and keep the replay, full cascade, and browser clock cases registered by the allowlist suite. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review CI is green on f28dd19. This head remembers the signature that removed a key, instead of comparing clocks. The same signed revocation is a no-op after that key is approved again. A different signature still revokes, including when a descendant certificate is two minutes ahead and when the Gateway clock is ahead of the browser revocation. A revocable owner still takes every device it currently approved. |
|
🦞👀 Re-review progress:
|
The enrollment table still said a revocation keeps no history. The authority remembers the signature that removed a listed key for the life of that state, and the snapshot still omits it. This draft does not expire those signatures. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review CI is green on 9b740c2. The enrollment table and the revocation type now say the signature that removed a listed key stays on the authority state for its life. This draft does not expire those signatures, and the published snapshot does not include them. A shorter bound is still an owner decision. I did not add one. The replay cases stay registered by the allowlist suite. Moving them into a counted test file adds lines. Current main is 294 test lines over the ceiling (6443395 against 6443101), and a positive delta fails that check even with a matching allocation. The zero-delta layout is what keeps the required ratchet green. |
|
🦞👀 Re-review progress:
|
The three replay cases now sit in the counted owner suite. Shared signing helpers live on the world builder, and the suite is 10 lines shorter than main, so the test-line ratchet stays green while main is over its ceiling. Signed-off-by: Sebastien Tardif <[email protected]>
|
@clawsweeper re-review CI is green on ec20db3. The three replay cases now sit in the allowlist suite, which is the counted owner file. Shared signing helpers live on the world builder. That suite is 10 lines shorter than main, so the test-line delta is negative. An allocation cannot cover main's inherited overage: the checker fails any positive delta while the tree is over the ceiling. The signature ledger and its lifetime are unchanged. A shorter bound is still the protocol owner's decision. No Gateway route calls submitStatement. |
|
🦞👀 Re-review progress:
|
|
Thanks @SebTardif. You found a real bug: a captured revocation could remove a device again after an owner approved it back. This PR is what prompted the fix, and we've credited you there. We're closing this in favor of #193146, which fixes the same replay differently. Here's why, for the record. Why not a list of applied revocations. This PR remembers every revocation signature that removed a key. That list only grows: one entry per removal, kept for the life of the claw. On 2026-11-02 we deliberately stopped keeping history after the old revoked list outgrew the 256-entry statement limit. The claw now keeps only current state. A growing list would bring that problem back, and a stolen owner device could grow it on purpose by approving and revoking keys in a loop. What #193146 does instead. A revocation covers only what its signer saw:
The claw needs nothing beyond one number per listed key, so its storage stays within the existing caps. The same PR also bounds invites: each lasts at most a week, a claw keeps at most 100, and expired ones are deleted. Your test cases helped shape this. Thank you again. |
…at was approved again (#193146) A Revocation now names its claw and the membership seq its signer saw, and every listed key records the seq at which it was listed (re-adding a listed key keeps it). A revocation removes only keys listed at or before its seq, together with every device they approved; a key listed again later is refused as seq_conflict, so replaying captured bytes changes nothing and no list of past revocations is kept. Invites stay bounded the same way: a cap may expire at most a week after registration, a claw keeps at most 100 invites, spent records are deleted before counting, and removing an owner device deletes the open invites it registered. Prompted by #192230 (thanks @SebTardif).
…at was approved again (openclaw#193146) A Revocation now names its claw and the membership seq its signer saw, and every listed key records the seq at which it was listed (re-adding a listed key keeps it). A revocation removes only keys listed at or before its seq, together with every device they approved; a key listed again later is refused as seq_conflict, so replaying captured bytes changes nothing and no list of past revocations is kept. Invites stay bounded the same way: a cap may expire at most a week after registration, a claw keeps at most 100 invites, spent records are deleted before counting, and removing an owner device deletes the open invites it registered. Prompted by openclaw#192230 (thanks @SebTardif).
What Problem This Solves
A captured OpenClaw ID revocation can delete a device again after an owner approves that same key back. Membership changes carry a sequence number, so a second submit fails. A revocation does not, and the mailbox accepts it.
User Impact
Submitting the same signed revocation again does not remove an owner device or browser that was approved after that signature was captured. A new signature still revokes, including when the signer's clock is behind the certificate. A revocation for a key the claw no longer lists stays a no-op.
Why This Change Was Made
applyRevocationused to delete whatever fingerprint was listed, so the old signature removed a later approval. Comparingissued_atwith the certificate clock was the wrong guard: a certificate may be up to five minutes ahead of Gateway time, and a fresh revocation then looked older than the certificate. The signature that actually removed a key is remembered instead. The same bytes are a no-op. A different signature still revokes, and a revocable owner still takes every device it currently approved.Evidence
Terminal output from the identity protocol package at
ec20db33baa1, throughsubmitStatement:Real behavior proof
submitStatementyet.