Repository navigation
Conversation
Use the existing Windows Job supervisor for default Gateway fixture launches, with direct argv and the actual Gateway PID. Join native tree extinction and output closure instead of relying on taskkill's snapshot-based exit status. Keep custom command-prefix fixtures on their existing cleanup contract. Preserve the startup and shutdown budgets through asynchronous admission and cleanup. Reject both owner joins on deadline and retain failed fixture state. Keep root-exit, held-output, unknown-tree, and late-receipt controls intact. Regression context: main run 35128973442, Windows job 104906301242.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 16, 2026, 3:11 PM ET / 19:11 UTC. ClawSweeper reviewWhat this changesWindows Gateway test fixtures now use the existing Windows Job supervisor to launch executables directly and wait for owned processes and output to finish during cleanup. Merge readiness⛔ Blocked before merge - 3 items remain The cleanup repair remains useful: current main and the latest release still use taskkill for these fixtures. No blocking defect was identified in the introduced changes, and this maintainer-authored PR is protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherGateway tests launch isolated OpenClaw processes and must stop them before releasing fixture state. The Windows Job supervisor owns the process tree and reports root exit, output completion, and confirmed tree termination separately. flowchart TD
A[Gateway test fixture] --> B{Custom launch command?}
B -->|Yes| C[Existing process launcher]
B -->|No on Windows| D[Windows Job supervisor]
D --> E[Gateway and descendants]
E --> F[Root exit and output completion]
D --> G[Confirmed tree termination]
F --> H[Release fixture state]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +35, Tests +362. Total +397 across 10 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one Windows Job owner responsible for fixture descendants and cleanup confirmation, while retaining main's shared output relay and diagnostic improvements. Do we have a high-confidence way to reproduce the issue? No high-confidence reproduction of the intermittent native failure is established: all five baseline repetitions passed. Source inspection confirms that an indeterminate taskkill result immediately fails fixture cleanup. Is this the best way to solve the issue? Yes. Extending the existing Job supervisor preserves native process ownership after root exit and avoids inventing another descendant census or termination owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a3a09980e942. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Superseded by #150244, which targets the same |
Related: #150244 addresses the same reported main-run failure.
What Problem This Solves
The Windows cron process-identity test intermittently fails during Gateway cleanup after its cron assertions complete. Main run 35128973442, job 104906301242, reported
termination-indeterminateaftertaskkill /Freturned 255 in 63 ms, before Node observed exit or output closure.User Impact
This fixes test infrastructure. Default Windows Gateway fixtures finish cleanup only after every owned process has exited and output has closed. Existing production callers retain their behavior.
Why This Change Was Made
The existing terminator already uses
/T. Its nonzero result immediately rejects cleanup, and its direct-child fallback cannot certify descendant termination. The discarded command output does not establish the precise Windows reason for status 255. The scheduled system event runs inside the existing Gateway; source inspection found no cron-spawned Gateway to repair.Use the existing Windows Job supervisor for fixture launch and cancellation, extending it to direct executable/argv launches so the reported PID remains the actual Gateway PID. The fixture exposes output closure only after that owner confirms zero active processes and completed output. Root exit preserves authority to stop remaining descendants. Startup and shutdown retain their existing budgets; deadline expiry rejects both joins and retains failed fixture state. Custom command prefixes keep their existing launch contract, including deliberate delayed-writer fixtures.
The supervisor's existing output relay moved unchanged into a sibling module to satisfy the line-cap ratchet.
Evidence
The temporary workflow runs only
src/gateway/gateway-cron-process-identity.windows.test.tsonblacksmith-8vcpu-windows-2025, with five repetitions,fail-fast: false, and a 15-minute timeout per job. Its workflow bytes are identical before and after the fix.The baseline did not reproduce the intermittent failure. Both runs’ logs confirm one executed, passing test in every repetition; the fifth baseline job spent about 25 minutes waiting for a runner.
Focused regressions failed before the corresponding repairs: raw Windows Job routing, bounded cleanup settlement, and fixture termination observations. Final macOS proof passed 142 tests across the owner and fixture files, with 55 platform skips. Existing unknown-tree, held-output, and retired-PID controls remain enforced. Native literal-argv, exact-PID, and ignored-stdio descendant coverage was added to the existing Windows command test file for regular Windows CI.
node scripts/check-changed.mjs, scoped oxfmt,git diff --check, andpnpm check:line-cap-ratchet --base origin/mainpassed. The requested independent Codex branch review returned scoped-clean at P0/P1 with no findings for6940009355d5bbf90c6398e3dc178002d760e323.Initial sibling checks found no overlapping fix. A later check identified the concurrent repair in #150244. #150010 remains unrelated; #148692 only corrected the error wording.
The temporary proof branch was deleted after both matrices completed.