Skip to content

fix(relay): preserve rotated peer generations through recovery - #216

Merged
abruption merged 2 commits into
mainfrom
fix/203-recovery-generation
Sep 27, 2026
Merged

abruption merged 2 commits into
mainfrom
fix/203-recovery-generation

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Preserve the archived peer generation and sign it in v2 recovery approvals. Commit the actual generation instead of zero, rejecting conflicting/unknown generations. Keep safe compatibility for v1 approvals when the archived generation is known.

Closes #203

Type

  • fix

Checklist

  • python3 cc_peer.py list works locally (live-session inspection not performed)
  • python3 cc_peer.py list --host <a real host> works over SSH (out of scope)
  • --dry-run resolves a target without posting anything (covered by existing mocked contracts; no live target)
  • Commits follow Conventional Commits
  • Docs updated if behavior changed
  • No secrets, tokens, or session keys in the diff (synthetic sentinels only)

Verified against

macOS arm64; Python 3.14.7, websockets 17.1; Node 22.14.0 for Control. Linux/Windows matrix results are left to PR CI, not claimed from this machine.

Full Python suite: 541 tests, 12 skipped. Recovery fixtures exercise generations 0/1/3, signed tampering, idempotence, legacy approvals and successful subsequent rotation. Added missing-legacy-generation refusal fixture passes. Documentation: 10 tests.

Notes

Upgrade the committing device before generating schema v2 approvals; old committers only accept v1. Unknown rotated generations fail closed, not zero. Tests are isolated local stores, not live recovery. Existing snapshot SQLite warnings belong to #209.

Prepared in an isolated worktree from main 03d4bd4. No merge, release, production deployment, real send or ACK test is included. CI status is independent of the local checks above.

@abruption abruption added this to the v1.0.2 milestone Sep 27, 2026
@abruption
abruption merged commit 089e48d into main Sep 27, 2026
24 checks passed
@abruption
abruption deleted the fix/203-recovery-generation branch September 27, 2026 05:21
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.

fix(recovery): retain peer key generations across lost-device recovery

1 participant