Repository navigation
test: make Docker build interruption readiness durable - #185034
Conversation
|
🦞👀 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: needs maintainer review before merge. What this changesThis PR replaces Docker interruption-test readiness through FD3 with the existing durable-file helper and explicitly waits for child settlement. Example: Run the interruption test on macOS without timeout or gtimeout, then send SIGTERM.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a source-verifiable fixture failure on the supported Node watchdog fallback while preserving the interruption assertions; no actionable defects were found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe regression suite launches the real Docker build shell helper with a synthetic Docker executable, then observes readiness, signal propagation, exit status, and process cleanup. flowchart TD
A[Interruption test] --> B[Runner shell]
B --> C[Docker build helper]
C --> D[Native timeout or Node watchdog]
D --> E[Docker fixture]
E --> F[Readiness and TERM markers]
F --> A
A --> G[Exit status and PID assertions]
Technical reviewBest possible solution: Use the existing durable readiness marker and exact-PID settlement helper while retaining both signal cases and all interruption outcomes. Do we have a high-confidence way to reproduce the issue? The source establishes the failure: the fixture requires FD3 while the Node fallback inherits only standard streams; the PR reports matching Darwin failures, but this read-only review executed no tests. Is this the best way to solve the issue? The patch is the smallest complete repair: it reuses existing readiness and settlement owners, removes the unsupported descriptor contract, and preserves independent outcome assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 61bd9c66b59c. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests -9. Total -9 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 5:29 PM ET / 21:29 UTC. |
|
Fixed: Docker build interruption readiness now uses durable fixture state and explicit child settlement across native timeout and Node fallback hosts. |
Make Docker build interruption readiness durable across native timeout and Node fallback hosts without changing production timeout behavior.
What Problem This Solves
The Docker build interruption regression test used a fourth inherited file descriptor as both its readiness signal and an implicit child-settlement join. That assumption fails on the supported Node watchdog fallback, which inherits standard streams but does not promise arbitrary caller descriptors. The fake Docker process then exits on a bad descriptor before the test can exercise the SIGTERM or SIGINT behavior it is meant to protect.
User Impact
There is no production behavior change. The test can now validate the existing Docker build interruption contract on hosts with a native timeout command and on hosts that select the Node fallback. The protected outcomes remain unchanged: SIGTERM and SIGINT return 143 and 130, only one Docker attempt runs, the real TERM trap completes, and the exact child PID is gone.
Why This Change Was Made
The fixture already writes a durable
docker.readymarker after installing its TERM trap and blocking FIFO. This change waits for that persistent marker while racing it against runner settlement, using the existing fixture-file helper and the existing Vitest lifetime signal. It removes the private FD3 pipe entirely.After the runner closes with the expected status, the test now explicitly waits for the recorded Docker PID to disappear before requiring the TERM marker. That ordering preserves the original settlement assertion without adding a descriptor contract, sleep, retry, deadline, or test-only production seam. The complete change is test-only and removes more fixture machinery than it adds.
Evidence
Bad file descriptorat the fixture's FD3 readiness write, then collided with the retained FIFO on retries. The signal-settlement assertions were never reached.timeoutnorgtimeoutavailable, changed-file formatting/lint and the affected TypeScript graph passed. The complete changed test file passed 123 tests with 2 intentional skips in 63.36 seconds, including both interruption signals and the existing Node watchdog controls./usr/bin/timeoutselected, the focused interruption case passed with one worker. It exercised both SIGTERM/143 and SIGINT/130, the one-attempt assertion, TERM marker, and exact-PID settlement through the native timeout route.Hosted CI passed on the exact head. A fresh full-source independent review and the installed P0/P1 autoreview found no defects. ClawSweeper also found no actionable findings; it rated patch quality Platinum and overall readiness Gold because its read-only review did not receive the retained raw runtime artifacts.