Skip to content

Write the recovery doc and route host pause, resume and move - #314

Merged
dinoderek merged 13 commits into
mainfrom
task/engine-345
Nov 23, 2026
Merged

dinoderek merged 13 commits into
mainfrom
task/engine-345

Conversation

@dinoderek

Copy link
Copy Markdown
Owner

Objective

Adds docs/recovery.md: for each of the eight restart-resilience failures, how engine detects it, what it does, and the commands an operator runs, including the planned-reboot runbook. Adds its load-trigger row to AGENTS.md. Also routes engine host pause|resume|move to the server, which the runbook depends on.

Gates

Lane Result Evidence
./dev test (every required lane) PASS Local run at e5cedc4 with umask 022: format, vet, lint, unit, coverage, file-length, imports, versions, docs-check, harness-names all PASS
  • New or changed tests:
    • internal/cli/control_test.go: TestServerCommandsRouteByTheirIDs (adds pause, resume and move as server forms); TestHostPauseResumeAndMoveAreNotHostOps (fails with unknown op "pause" without the routing fix).
  • Not run, with reason: none. Local unit and coverage failed on two file-mode tests (TestTrustFolderKeepsEverythingElse, TestEditFileRetriesThenGivesUpOnABusyFile) when the shell's umask was 0077; they pass with umask 022. CI is the authority for this PR.

Rulings

None.

Review

  • Fresh reviewer: Claude Opus 5.5 (claude-opus-5-5), four fresh reviewers in review mode.
    • Round 1: CHANGES REQUESTED (eight findings, all fixed).
    • Round 2: CHANGES REQUESTED (CLI routing bug, retry command, request-key claim, dashboard reachability, copied rules; fixed).
    • Round 3: CHANGES REQUESTED (routing fix correct; doc claims about dashboard and request keys; fixed).
    • Round 4: APPROVED (optional findings on duplicated figures and operator-only commands applied in e5cedc4).
  • Declined findings: none.
  • Review hard:
    • internal/cli/control.go, serverCommand: the host routing condition.
    • docs/recovery.md, "Host is unreachable" and "Planned reboot": the operator-only and fleet-read caveats.

Deviations

  • The CLI routing change in internal/cli/control.go is outside the docs-only card. It was raised with the operator, who chose to fix it in this PR.
  • No baseline rows, //nolint directives, budget changes or skipped lanes.

🤖 Generated with Claude Code

dinoderek and others added 13 commits November 23, 2026 01:25
Covers each failure's detection, response and operator commands, and the
runbook for a planned reboot, with a load-trigger row in AGENTS.md.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Outage wakes apply only to outages long enough to count, a blind move's
safeguard is the push check rather than a divergence refusal, and rules
are cited to their owning docs.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Limit the server restart to hosts with a unit, make the tmux_unit caveat
explicit, name the retry command, drop the command table in favour of the
command reference, and wait for moved windows before a planned reboot.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
The CLI sent every host command except --all to host ops, which refuse
pause, resume and move as unknown ops. Those three now reach the server's
command layer, with a test that fails without the routing.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Reachability comes from host status, not the dashboard. A manual rerun is
a new request unless it passes the printed key. Rules now cite their owner
rather than restating counts and times, and the host-command comment names
the server forms it routes.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
…overy doc

Owning docs keep the wait and the placement rule, the operator-only
commands are named once, and the stale-read caveat moves to host status.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Adopting a kept worktree with a stale index lock runs lsof, so the host
needs it installed.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
The setup step names the four tools its checks cover, so lsof is not
implied to be checked.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
The step names the four tools engine setup checks, and stays within the
operator-setup word budget.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Setup checks the step's tools except lsof and sqlite3, so the step says so
rather than listing what setup checks.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Merging main brought its operator-setup text in, and the step now states
what setup does not check in fewer words.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVDtqMjUaFU3QKdzGEf
@dinoderek
dinoderek merged commit 2c186d2 into main Nov 23, 2026
1 check passed
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