Skip to content

feat(cutover): add carrier-bound finish-bound CLI for drained generations (#462) - #464

Merged
James3014 merged 1 commit into
mainfrom
fix/issue-462-cutover-finish-bound
Oct 9, 2026
Merged

James3014 merged 1 commit into
mainfrom
fix/issue-462-cutover-finish-bound

Conversation

@James3014

Copy link
Copy Markdown
Owner

Refs #462 (sidecar-side items remain open) (CLI/closure-path acceptance item).

Problem

When the owner sidecar aborts after activation, a coordination-bound generation stays drained even though the replacement runtime is live. cutover observe is refused as legacy (COORDINATION_REQUIRED), so closure required a hand-written finish-only script.

Change

  • New devspace cutover finish-bound --cutover-id --carrier --version --validity-version --credential-file --workspace-id --agent-id --confirm [--json].
  • Same authority as restart-bound: consumes the rotated owner-private credential intent file (loader factored into readCarrierCredentialIntent, behavior unchanged) and binds the carrier via localDrainedCutoverContext.
  • performLocalBoundCutoverFinish (in cutover-local-restart.ts) requires live /healthz to equal expectedNewIdentity with a different serverInstanceId than the old instance, runs the existing resolveDurableReconciliationWitnessFromInventory exact-pair witness (no duplicated witness logic), then calls DurableOperationManager.finishCutover, which still enforces lease, identity and witness checks.
  • Usage text in cutover help and a section in docs/coordination-readers.md.

Not in this PR

Sidecar healthz probe fix (connection: close + one retry) and resume-from-drained live in the owner sidecar outside this repo; the remaining #462 acceptance items there stay open.

Tests

  • src/carrier-binding.test.ts: finish-bound closes a drained+activated generation (phase closed, exact-pair receipt); refuses old-instance and wrong-build live identity and a wrong credential without state change.
  • src/cli.test.ts: finish-bound usage and flag rejection.
  • npm run test:carrier-binding, npx tsx src/cli.test.ts, npm run typecheck, npm run build pass.

🤖 Generated with Claude Code

…ions (#462)

Closes a coordination-bound drained generation whose replacement is already
live, using the restart-bound carrier credential pattern, exact live identity
check, and the existing exact-pair witness resolver.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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