Skip to content

fix(hosts): treat a definitive activation refusal after expiry as terminal #99

Closed

Description

@wstein

After #85, connection.Run ends with owner newcode recovery when the active certificate has expired and no pending certificate exists. When a pending certificate exists and the old certificate has expired, though, a first activation that the server definitively refuses is retried forever. An expired pending certificate is also retried forever. The contract (specs/006-whr-cli/contracts/host-enrollment.md, "Renewal and crash recovery") says: "First staging/activation after old expiry fails and requires explicit owner newcode recovery."

Acceptance criteria

  • A definitive activation refusal after the old certificate's expiry (server error class, not transport) ends Run with the recovery error and exit 66.
  • An expired pending certificate ends Run the same way.
  • Transient failures (transport, 5xx, timeouts) keep retrying with backoff.
  • Tests cover each case; make check is green.

Found by the independent review of #85 on 2026-10-16. Builds on #98.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions