Skip to content

fix: preserve registration when sync bootstrap fails - #5

Open
SeaOceanO wants to merge 1 commit into
AgentConnect:mainfrom
SeaOceanO:fix/registration-sync-recovery
Open

fix: preserve registration when sync bootstrap fails#5
SeaOceanO wants to merge 1 commit into
AgentConnect:mainfrom
SeaOceanO:fix/registration-sync-recovery

Conversation

@SeaOceanO

Copy link
Copy Markdown
Contributor

Summary

  • finalize the accepted identity and bearer session before starting Sync V2 bootstrap in both Python and TypeScript
  • keep a bootstrap failure recoverable through the existing id init-sync command and report that recovery action explicitly
  • add behavioral regressions proving the remote registration runs once, local identity/session are published, pending registration is cleared, and the same Sync installation can be completed afterward

Why

Previously, a successful remote registration followed by a bootstrap timeout left only pending keys and no identity.json or session.json. id init-sync could not load that state, while retrying registration called the remote register method again with an often one-time OTP.

Verification

  • Python: Ruff format/lint, strict mypy, 167 passed, 1 skipped, 7 deselected
  • Python repository contracts: 7 passed
  • Python sdist and wheel build passed
  • TypeScript: Prettier, ESLint, typecheck, 102 tests across 15 files, and build passed
  • git diff --check

Scope

This is a four-file recovery-order hotfix with no new state format, command, dependency, or runtime abstraction. It prevents new stranded registrations; it cannot reconstruct bearer tokens from failures that occurred before this fix because those tokens were never persisted.

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