Skip to content

test: make Docker build interruption readiness durable - #185034

Merged
shakkernerd merged 1 commit into
mainfrom
docker-interrupt-durable-readiness-502
Oct 26, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
docker-interrupt-durable-readiness-502

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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.ready marker 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

  • Before the repair, the Darwin Node-fallback route failed on Bad file descriptor at the fixture's FD3 readiness write, then collided with the retained FIFO on retries. The signal-settlement assertions were never reached.
  • On Darwin arm64 with Node 24.22.1 and neither timeout nor gtimeout available, 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.
  • On Linux x86_64 with /usr/bin/timeout selected, 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.
  • The exact validated commit changes one test file by 7 additions and 16 deletions. Production watchdog, timeout selection, signal, retry, and cleanup code is unchanged.

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.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@shakkernerd shakkernerd self-assigned this Oct 26, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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.

  • Before: The Docker fixture writes to an unavailable FD3 and fails before exercising interruption.
  • After: The test observes docker.ready, sends SIGTERM, and checks exit 143, one attempt, TERM-trap completion, and child exit.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported test repair with passing hosted checks and reported cross-platform harness validation; direct runtime artifacts were not supplied.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, test-only repair is outside the ordinary contributor proof gate; the body reports both timeout routes exercising the real shell helper with a synthetic Docker process, without attached runtime artifacts.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Maintainers cannot reliably exercise Docker build interruption on hosts using the Node watchdog fallback.
Reason: The maintainer-authored direction restores useful regression coverage without changing runtime behavior or weakening assertions.

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
Reviewed head: 6085b1dbe8a50c9da5f31c7ac205bd83a6dc6369

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • Docker fixture readiness and child settlement changes intended behavior with a stated reason (5c4e9ab: Use producer-owned readiness and child settlement instead of independent wall-clock deadlines on loaded hosts; the original FD3 path also joined TERM-trap completion.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 5c4e9ab adds test/scripts/docker-build-helper.test.ts:1402 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5c4e9aba9293; files: test/scripts/docker-build-helper.test.ts)
  • Vincent Koc: Raw commit d31f4e2 adds test/scripts/docker-build-helper.test.ts:315 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d31f4e2d6235; files: test/scripts/docker-build-helper.test.ts)
  • Shakker: Raw commit 6119c1b adds scripts/lib/docker-e2e-watchdog.mjs:115 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 6119c1b63b1a; files: scripts/lib/docker-e2e-watchdog.mjs)

PR surface

Tests -9. Total -9 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 7 16 -9
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 16 -9

Labels

Label changes:

  • add P3: This is a focused test-fixture reliability repair with no production behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused test-fixture reliability repair with no production behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 26, 2026, 5:29 PM ET / 21:29 UTC.

@shakkernerd
shakkernerd merged commit 587c0f0 into main Oct 26, 2026
97 checks passed
@shakkernerd
shakkernerd deleted the docker-interrupt-durable-readiness-502 branch October 26, 2026 21:33
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: Docker build interruption readiness now uses durable fixture state and explicit child settlement across native timeout and Node fallback hosts.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
Make Docker build interruption readiness durable across native timeout and Node fallback hosts without changing production timeout behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant