Repository navigation
chore(node-host): cover password-missing supervisor exit - #137045
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 3, 2026, 2:10 AM ET / 06:10 UTC. ClawSweeper reviewWhat this changesThe PR adds missing-password reconnect-pause coverage to the node-host supervisor-exit test and verifies MCP cleanup completes before process exit. Merge readiness✅ Ready for maintainer review The prior cleanup-order finding is addressed: the revised test holds startup pending, verifies MCP cleanup starts before exit, and releases exit only after cleanup. Keep this maintainer-authored, maintainer-labeled PR open for normal exact-head review and CI completion. Priority: P3 Review scores
Verification
How this fits togetherThe CLI node host connects to the Gateway and owns local MCP clients. On terminal authentication or version reconnect pauses, it shuts those clients down before exiting so its supervisor can restart it safely. flowchart LR
Gateway[Gateway reconnect pause] --> Runner[CLI node host]
Runner --> Decision[Terminal pause decision]
Decision --> Cleanup[MCP client cleanup]
Cleanup --> Exit[Supervisor-facing process exit]
Exit --> Restart[Supervisor restart]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +24. Total +24 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the focused table-driven regression test so future edits cannot omit MCP cleanup before a password-missing supervisor restart. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds regression coverage rather than reporting a separately reproducible runtime defect. Is this the best way to solve the issue? Yes: extending the existing parameterized terminal-pause test covers the omitted protocol detail without adding production seams or duplicate test structure. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53066564532e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
086cb99 to
3503101
Compare
|
@clawsweeper re-review Addressed the cleanup-order finding on |
|
🦞🧹 I asked ClawSweeper to review this item again. |
3503101 to
1c81a54
Compare
|
@clawsweeper re-review CI found and we fixed the test mock return type on |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Related: #134142
What Problem This Solves
The CLI node host intentionally exits when the Gateway reports a terminal
token, password, bootstrap, or client-version reconnect pause so its supervisor
can restart it with refreshed credentials. The existing runner regression
coverage omitted the exact
AUTH_PASSWORD_MISSINGdetail reported by theGateway upgrade incident.
Why This Change Was Made
This adds the missing password-auth case to the existing terminal-pause table.
The test keeps Gateway readiness pending, blocks MCP shutdown, and proves the
process cannot exit until MCP cleanup completes. Runtime behavior is unchanged.
User Impact
No user-visible behavior changes. The test protects the documented supervisor
restart policy and cleanup ordering for CLI nodes when a Gateway rejects a
reconnect because a password is missing.
Evidence
PATH="$HOME/.nodenv/versions/24.15.0/bin:$PATH" node scripts/run-vitest.mjs src/node-host/runner.test.ts(41 passed)./node_modules/.bin/oxfmt --write --threads=1 src/node-host/runner.test.ts./node_modules/.bin/oxlint --deny-warnings src/node-host/runner.test.tsgit diff --checkThe prior ClawSweeper finding about pre-callback cleanup is addressed: the
runner remains live until
onReconnectPaused,process.exitis asserted absentwhile MCP close is pending, and exit status 1 is observed only after cleanup is
released.