fix(runner): separate failed operations from process shutdown status - #304
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Keep handled background operation failures from poisoning the runner's graceful process exit. Deployment's strict zero-exit drain check remains intact.
Work authority
Work item / Issue: Keep background operation failures separate from runner process shutdown status #303; Diagnose and recover operations-runner OpenBao trust after boot deployment#633
Proposal / decision: User-directed reboot recovery before Identity migration; Platform #467.
Assignment / checkpoint: N/A — direct local user instruction, not a TreeSeed assignment.
Actor: Codex acting through authenticated adrianwebb.
Human authority: adrianwebb authorized staging fixes and managed recovery.
Agent / capacity provider: N/A — local Codex task, not a delegated provider assignment.
Exact base ref: staging 0b2cf9b
Exact head ref: codex/runner-exit-status 16133aa
Agent-authored under human authority
Plan
Reproduce the sticky exit-status source defect; move status handling to one-shot execution; add regression coverage; verify in Actions. Keep live authentication unchanged and track managed runner/reboot acceptance separately.
Changes and commits
16133aa removes process-global exit mutation from shared polling and retains failure status for one-shot commands. Four regression cases complement the existing graceful-drain test.
Verification
Five tests pass:
npm run test:control-plane -- tests/unit/control-plane/release/runner-operation-exit.test.ts tests/unit/control-plane/release/runner-drain.test.ts.npm run build:distpassed. Git diff whitespace check passed. Full Verify Actions: https://github.com/treeseed-ai/api/actions/runs/34402252812 (in progress).Risk and rollback
No data/schema/authentication changes. One-shot failures remain nonzero; successful polling never clears unrelated fatal status. Revert this commit through a staging PR if needed. Do not deploy current API staging wholesale because it contains pending Identity changes; use compatible runner development acceptance before coordinated cutover. No purge or credentials reset.
Completion summary
Source fix and focused tests complete; required Actions and managed acceptance remain. Current host was restored through manager restart after failed unattended rc284 boot. Do not equate manual recovery or this source PR with cold-boot acceptance.
Submission checklist