Skip to content

fix(hosts): report owner newcode recovery for an expired identity #85

Closed

Description

@wstein

When the active certificate has expired and no pending certificate exists, connection.Run (client.go, Run) emits disconnected and retries every 30 s forever. specs/006-whr-cli/contracts/host-enrollment.md ("Renewal and crash recovery") says this case requires explicit owner newcode recovery: preserve all state and report failure.

Acceptance criteria

  • With an expired active certificate and no pending certificate, Run returns a distinct terminal error instead of retrying.
  • A pending certificate still gets its activation attempts (activation can succeed after the old certificate expired).
  • The agent's exit code and message name owner newcode recovery, consistent with the contract and ADR 0013.
  • Tests cover both cases; make check is green.

Depends on #84 (same file).

Found by the independent pilot review on 2026-10-16. Builds on the pilot branch pilot/installable-pilot-pr (split from #83); start from its current head.

🤖 Generated with Claude Code

Activity

  1. wstein commented on Oct 16, 2026

    @wstein
    OwnerAuthor

    Done in #98. Final make check on main 1cb22c2: GREEN (850 harness, 654 Go, 200 ExUnit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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