Skip to content

Keep a re-keyed shared key when its grant lands but the call fails - #83

Merged
Ocnrb merged 4 commits into
mainfrom
fix/rekey-recovery
Oct 5, 2026
Merged

Ocnrb merged 4 commits into
mainfrom
fix/rekey-recovery

Conversation

@Ocnrb

@Ocnrb Ocnrb commented Oct 5, 2026

Copy link
Copy Markdown
Member
  • A reset minted the new key, sent the grant and only then saved it: a grant that landed while the call failed left the old key revoked and the new one lost until a manual reset
  • The new key is now saved as pending before the grant goes out, promoted and announced once it returns, and settled from the chain on the call's failure and on the owner's next open; a pending key travels through sync and a reset over an unsettled one refuses while the chain cannot be read
  • A held shared key whose rev no announce carries is announced regardless of the old announce's freshness
  • A publish key reset whose grant landed on one stream only is finished on the other

Ocnrb and others added 4 commits October 5, 2026 18:48
- A fresh announce of the older rev kept the self-heal quiet, so a key adopted without its announce stayed unannounced until retention aged the old one out

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- The new key is written down as pending before the grant is sent, and only replaces the old one once the chain shows its grant
- A failed call, and every owner open after it, settle the pending key from the chain: promote it, keep it while the grant may still land, or drop it an hour after it clearly never did
- A reset over a pending key that the chain left unsettled revokes that key too, so whichever grant lands last leaves one holder; while the chain cannot be read the reset is refused, since it would drop the only record of a key that may hold the grant

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- Merged by the higher rev like the shared keys, and dropped once a key or announce at its rev shows a device settled it
- Pushed as soon as it is written, so a device lost before the grant settles leaves the key with the others
- Parity vectors gain the merge cases, and both pending fields count as news

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- The publish key's grants are one transaction per stream, so a reset can stop with -1 moved and -2 not; settling it sends the missing stream's grant, the one the owner already authorised, and then adopts the key

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Ocnrb
Ocnrb merged commit 4e53801 into main Oct 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant