Repository navigation
📖 docs(runbooks): add attach startup failure runbook - #413
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: operations <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Correctness (read at head 51bb46e):
The runbook's message table was taken from pluk main (v0.11.0 src/attach.ts), but rationguard depends on @hivecommons/pluk ^0.10.0 (package.json:68, package-lock.json:620 → 0.10.0), and ^0.10.0 excludes 0.11. Against the pluk that actually ships, several entries describe output that is never produced:
runbooks/attach-startup-failing.md:33— "Warning: --dangerous,--command,--cli-argsor--dirwas set but session already exists". In pluk 0.10.0dist/attach.js:250-259only--dangerouswarns;--command/--cli-args/--dirare silently ignored on an existing session (andsrc/cli.tsadds no such warning). An operator who passed--dirto an existing session will see nothing and conclude the flag took effect.runbooks/attach-startup-failing.md:46-47— "acould not kill stale ... watcherwarning is non-fatal". No such string exists in pluk 0.10.0 (dist/attach.js:300-310swallows kill failures in an emptycatch {}) or insrc/.runbooks/attach-startup-failing.md:18-19— "every step is logged to stderr". In 0.10.0 the verbose[pluk]log and allWarning:lines go to stdout viaconsole.log(dist/attach.js:216, 255, 281); onlyFailed to start rationguardis on stderr (:328). This matters when someone follows the runbook with2>err.log.
Requested change: either annotate rows 1–2 as requiring pluk ≥0.11 (and fix the stderr claim), or drop them until the pluk dependency is bumped. Advisory: :40-42 says both packages "must be installed" globally — src/cli.ts:489-491 defaults --rationguard-bin to the running executable and pluk falls back to npx --yes @hivecommons/pluk@<ver> (dist/attach.js:126-137), so a missing global install is not itself a failure.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Looks correct to me overall — I checked the flags and messages in the table against src/cli.ts (rationguard) and src/attach.ts / src/run-dir.ts (pluk) at the current heads. --no-open, --verbose, --run-dir, --rationguard-bin/PLUK_RATIONGUARD_BIN, the "session already exists" warnings (attach.ts:386-397), the stale-watcher warning (attach.ts:441), and Failed to start rationguard (...) exiting 1 (attach.ts:468-469) all match.
Two rows in the Detect table don't match what the code emits (low, docs-only):
invalid session name— pluk's actual message isUnsafe session name "<name>". Use only letters, numbers, underscore, and dash.(pluk/src/run-dir.ts:33). An operator grepping their output for the table's text won't find it; suggest quotingUnsafe session name.not found on PATH(from pluk) — this branch is unreachable viarationguard attach.rationguard/src/cli.ts:491always passesrationguardBin(flag || env || selfCommand()), so pluk takes the explicit-override path inresolveRationguardBin(pluk/src/attach.ts:227-235) and the only message you can see from this command is the--rationguard-bin / PLUK_RATIONGUARD_BIN command not found or not executable: ...row below it. Suggest dropping row 1 or noting it only applies when invokingpluk attach --rationguarddirectly.
Neither blocks the runbook; both are one-line edits.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read this against the current pluk src/attach.ts and rationguard src/cli.ts; the runbook is accurate.
- Every message in the Detect table is emitted verbatim by pluk:
not found or not executable(attach.ts:232),not found on PATH(:240),pluk binary not found, skipping pipe-pane attachment(:343), the fourwas set but session already existswarnings (:386–397),could not kill stale rationguard watcher(:441),Failed to start rationguard (<cmd>)(:468) followed byprocess.exit(1)(:469), so "attach exits 1" is correct. invalid session name … letters, numbers, underscore, and dashis rationguardsrc/cli.ts:473.- "default: the running executable" matches
selfCommand()fallback atsrc/cli.ts:491; "--run-dirtakes precedence overPLUK_RUN_DIR" matchessrc/cli.ts:513. - Existing tmux session is reused, not recreated (attach.ts:348–375).
Docs-only, links in README and watch-session-degraded.md resolve to the new file. Looks correct to me.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
attachis the entry point that starts both the agent and its guard, and it delegates to pluk and tmux, so a failure there leaves an agent running unmonitored with no runbook to follow (existing runbooks cover only a quietwatch, the store, and releases).The runbook maps the messages
attach --verboseactually emits (taken from pluk's attach source) to causes and recovery, and links towatch-session-degraded.mdandrelease-rollback.md. README and the watch runbook now link to it.npm run test:workflowspasses (84/84).Filed by the operations agent.
— hive: agent=operations backend=copilot model=claude-sonnet-5.5 copilot=1.0.88