fix(process): bound Windows exec timeout cleanup#104234
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 9:16 AM ET / 13:16 UTC. Summary PR surface: Source +76, Tests +171. Total +247 across 6 files. Reproducibility: yes. The PR provides a current-main Windows production reproduction around 11.6 seconds and exact-head runs around 2.5–2.6 seconds that also verify descendant termination and ordinary late-output retention. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the owner-separated design after the process owner accepts bounded best-effort cleanup: supervisor-owned deadline policy, process-tree-owned completion reporting, and hard-kill-only forced settlement. Do we have a high-confidence way to reproduce the issue? Yes. The PR provides a current-main Windows production reproduction around 11.6 seconds and exact-head runs around 2.5–2.6 seconds that also verify descendant termination and ordinary late-output retention. Is this the best way to solve the issue? Yes. This is the narrowest maintainable fix found: deadline policy stays in the supervisor, completion belongs to the process-tree owner, and forced stream settlement is limited to explicit Windows hard kills. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against da69daeb72cf. Label changesLabel justifications:
Evidence reviewedPR surface: Source +76, Tests +171. Total +247 across 6 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (8 earlier review cycles)
|
35d2f11 to
6276790
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: mikasa0818 <[email protected]>
edaf85e to
dec42ee
Compare
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(process): bound Windows exec timeout cleanup This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Foreground
execdeadlines on Windows could take roughly 10–12 seconds to return because the supervisor attempted a graceful phase even though Windows has no catchable SIGTERM equivalent. Earlier repairs also risked truncating output from ordinary descendants that retained inherited stdout/stderr.Why This Change Was Made
taskkill /F /Tcompletion, bounded at three seconds, and the child adapter does not settle a forced Windows kill before that completion signal.taskkilltraversal can run while cleanup is pending.end → exit → no closeevent ordering rechecks already-drained streams after recording exit, preventing an ordinary completed run from waiting forever.The three-second taskkill bound is an intentional availability policy: when Windows itself stops reporting completion, foreground exec returns after bounded best-effort cleanup rather than waiting indefinitely.
User Impact
Windows timeout results return promptly, timed-out process trees are normally gone before return, and ordinary descendant output is not truncated. No API, config, schema, dependency, PTY, Unix cancellation, or manual-cancel contract changes.
Evidence
node scripts/run-vitest.mjs src/process/kill-tree.test.ts src/process/supervisor/adapters/child.test.ts src/process/supervisor/supervisor.test.ts— 55 tests passed on exact rebased headdec42ee210e.node scripts/check-changed.mjs -- <six touched files>— core/core-test typecheck, lint, format, import cycles, dependency/API/database guards passed on Node 24.18. Blacksmith status timed out before repository proof, so the documented trusted-source local fallback ran the same plan.git diff --checkpassed.Fixes the Windows deadline regression introduced by #85865. Original fix by @mikasa0818; replacement commit preserves
Co-authored-by: mikasa0818 <[email protected]>.