takeover: the phase loop fails fast when its target dies mid-phase, and severedRemedy stops narrating a resume for a connection never re-attempted (#1011 mechanical half) #1013

Closed
opened 2026-08-30 02:39:16 +00:00 by ben · 2 comments
Owner

Parent

#1011 (ruled B, ADR 0209 amendment 3699e016) — the mechanical half, target-choice-independent.

What to build

A takeover phase whose target stops answering mid-run fails within a probe interval, not the 20-minute phase ceiling (defaultPhaseTimeout), and the failure it reports says what happened. Today a timeout-kill classifies FailInterrupted → severedRemedy "cut off mid-run — re-drive it to resume where it stopped", which #1011's forensics showed three times describing a connection that was never re-attempted and disk work that never happened.

Acceptance criteria

  • A phase whose target address dies mid-run reds in seconds-to-a-probe-interval, not at the phase ceiling.
  • The operator-facing remedy for that failure names the dead target and does not promise a resume of work that never ran; severedRemedy is reserved for a genuinely severed session with completed disk work behind it.
  • Offline: a test drives the phase loop against a target that stops answering after phase start and pins both the fast failure and the honest remedy text.

Blocked by

None — can start immediately.

## Parent #1011 (ruled B, ADR 0209 amendment `3699e016`) — the mechanical half, target-choice-independent. ## What to build A takeover phase whose target stops answering mid-run fails within a probe interval, not the 20-minute phase ceiling (`defaultPhaseTimeout`), and the failure it reports says what happened. Today a timeout-kill classifies `FailInterrupted` → `severedRemedy` "cut off mid-run — re-drive it to resume where it stopped", which #1011's forensics showed three times describing a connection that was never re-attempted and disk work that never happened. ## Acceptance criteria - [ ] A phase whose target address dies mid-run reds in seconds-to-a-probe-interval, not at the phase ceiling. - [ ] The operator-facing remedy for that failure names the dead target and does not promise a resume of work that never ran; `severedRemedy` is reserved for a genuinely severed session with completed disk work behind it. - [ ] Offline: a test drives the phase loop against a target that stops answering after phase start and pins both the fast failure and the honest remedy text. ## Blocked by None — can start immediately.

swarm-claim host=matou-dev-server-01 run=14244
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=14244 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1013 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1013,
  "status": "success",
  "commits": [
    "e4cc851f2ce1674af0fc0ed1b2636fd833479fb3"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "internal/clan/adapter.go",
    "internal/clan/enrollment.go",
    "internal/clan/errors.go",
    "internal/clan/enroll_phase_liveness_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/ -run 'TargetGoesDark|SeveredAfterDiskWork' -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/ -count=1",
      "exit_code": 0
    },
    {
      "command": "go test -race ./internal/clan/ -run 'TargetGoesDark|SeveredAfterDiskWork|Vanished|Reachable|Severed' -count=1",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/provision/ ./internal/enroll/ ./control-plane/... -count=1",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./internal/clan/ ./control-plane/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A phase whose target address dies mid-run reds in seconds-to-a-probe-interval, not at the phase ceiling": "enrollment.runInstallWatched (internal/clan/enrollment.go) runs a liveness watchdog alongside each install phase that reaps the invocation after installLivenessDarkStreak consecutive dark ssh knocks, instead of waiting out defaultPhaseTimeout; TestEnroll_TargetGoesDarkMidPhaseFaultsFastAndHonestly pins the reap completing under a deliberately-large 10-minute phaseTimeout ceiling within a 5s guard.",
    "The operator-facing remedy names the dead target and does not promise a resume of work that never ran; severedRemedy is reserved for a genuinely severed session with completed disk work behind it": "install() now branches on hasCompletedDiskWork: no disk work -> terminal FailTargetLost via targetLostFailure naming the dead target with a no-resume remedy; disk work behind it -> severedRemedy resumable block. Pinned by TestEnroll_TargetGoesDarkMidPhaseFaultsFastAndHonestly (FailTargetLost, names 100.103.56.212, no 'resume where it stopped', no resumable remedy) and TestEnroll_SeveredAfterDiskWorkStaysResumable (disko/install done -> resumable severed block).",
    "Offline: a test drives the phase loop against a target that stops answering after phase start and pins both the fast failure and the honest remedy text": "internal/clan/enroll_phase_liveness_test.go: TestEnroll_TargetGoesDarkMidPhaseFaultsFastAndHonestly injects an sshRun that answers the preflight then goes dark, and asserts both the fast reap (not the ceiling) and the honest terminal FailTargetLost text; TestEnroll_SeveredAfterDiskWorkStaysResumable locks the reserved-severedRemedy side."
  },
  "summary": "The takeover phase loop now reaps a target that vanishes mid-phase within a probe window (a during-phase liveness watchdog) and reds it as an honest terminal FailTargetLost naming the dead target, reserving severedRemedy for a genuinely severed session with completed disk work behind it.",
  "blockers": []
}
**close-report** for #1013 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1013, "status": "success", "commits": [ "e4cc851f2ce1674af0fc0ed1b2636fd833479fb3" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "internal/clan/adapter.go", "internal/clan/enrollment.go", "internal/clan/errors.go", "internal/clan/enroll_phase_liveness_test.go" ], "tests": [ { "command": "go test ./internal/clan/ -run 'TargetGoesDark|SeveredAfterDiskWork' -count=1", "exit_code": 0 }, { "command": "go test ./internal/clan/ -count=1", "exit_code": 0 }, { "command": "go test -race ./internal/clan/ -run 'TargetGoesDark|SeveredAfterDiskWork|Vanished|Reachable|Severed' -count=1", "exit_code": 0 }, { "command": "go test ./internal/provision/ ./internal/enroll/ ./control-plane/... -count=1", "exit_code": 0 }, { "command": "go build ./... && go vet ./internal/clan/ ./control-plane/...", "exit_code": 0 } ], "criteria": { "A phase whose target address dies mid-run reds in seconds-to-a-probe-interval, not at the phase ceiling": "enrollment.runInstallWatched (internal/clan/enrollment.go) runs a liveness watchdog alongside each install phase that reaps the invocation after installLivenessDarkStreak consecutive dark ssh knocks, instead of waiting out defaultPhaseTimeout; TestEnroll_TargetGoesDarkMidPhaseFaultsFastAndHonestly pins the reap completing under a deliberately-large 10-minute phaseTimeout ceiling within a 5s guard.", "The operator-facing remedy names the dead target and does not promise a resume of work that never ran; severedRemedy is reserved for a genuinely severed session with completed disk work behind it": "install() now branches on hasCompletedDiskWork: no disk work -> terminal FailTargetLost via targetLostFailure naming the dead target with a no-resume remedy; disk work behind it -> severedRemedy resumable block. Pinned by TestEnroll_TargetGoesDarkMidPhaseFaultsFastAndHonestly (FailTargetLost, names 100.103.56.212, no 'resume where it stopped', no resumable remedy) and TestEnroll_SeveredAfterDiskWorkStaysResumable (disko/install done -> resumable severed block).", "Offline: a test drives the phase loop against a target that stops answering after phase start and pins both the fast failure and the honest remedy text": "internal/clan/enroll_phase_liveness_test.go: TestEnroll_TargetGoesDarkMidPhaseFaultsFastAndHonestly injects an sshRun that answers the preflight then goes dark, and asserts both the fast reap (not the ceiling) and the honest terminal FailTargetLost text; TestEnroll_SeveredAfterDiskWorkStaysResumable locks the reserved-severedRemedy side." }, "summary": "The takeover phase loop now reaps a target that vanishes mid-phase within a probe window (a during-phase liveness watchdog) and reds it as an honest terminal FailTargetLost naming the dead target, reserving severedRemedy for a genuinely severed session with completed disk work behind it.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1013
No description provided.