Skip to content

fix: stabilize descendant cleanup CI proof - #107011

Merged
steipete merged 2 commits into
mainfrom
codex/harden-descendant-timeout-test
Jul 14, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/harden-descendant-timeout-test

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Resolves a problem where the descendant-cleanup process test could time out before its helper Node process started and reported the descendant PID on loaded CI runners.

Why This Change Was Made

The test timeout now leaves 500 ms for Node startup and PID reporting. The same test still requires timeout termination, forced descendant cleanup, and observed descendant death.

User Impact

No runtime behavior change. Maintainers get a less brittle CI signal for process-tree cleanup.

Evidence

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 14, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 14, 2026
@clawsweeper

clawsweeper Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 10:57 PM ET / July 14, 2026, 02:57 UTC.

Summary
The PR raises the descendant-cleanup process test timeout from 50 ms to 500 ms and documents that the margin covers helper Node startup on loaded CI runners.

PR surface: Tests +1. Total +1 across 1 file.

Reproducibility: yes. from source: the 50 ms timeout starts before the helper Node process initializes and reports its descendant PID, creating a clear loaded-runner race. The attached proof validates the repaired path, although it does not include a captured failing before-run.

Review metrics: 1 noteworthy metric.

  • Repeated CI proof: 20/20 full-file runs; 740 assertions passed. Repeated execution directly tests whether the larger startup margin removes the reported loaded-runner flake while preserving cleanup assertions.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No automated repair is needed; the patch has no actionable findings and only needs normal explicit handling under the protected maintainer label.

Security
Cleared: The diff changes only a test timeout and explanatory comment, introducing no runtime, dependency, workflow-permission, secret, or supply-chain surface.

Review details

Best possible solution:

Land the narrow test-only timeout adjustment after the remaining required checks complete, without changing production process-cleanup behavior.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: the 50 ms timeout starts before the helper Node process initializes and reports its descendant PID, creating a clear loaded-runner race. The attached proof validates the repaired path, although it does not include a captured failing before-run.

Is this the best way to solve the issue?

Yes. Increasing the timeout at the test boundary is the narrowest maintainable fix because it preserves the production implementation and every descendant-cleanup assertion; adding a new runtime synchronization seam would be broader than the CI-only problem.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b91a33d14a67.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The linked Blacksmith Testbox run exercises the actual changed CI test 20 times with 740 passing assertions, directly demonstrating stable after-fix behavior on the relevant hosted runner surface.

Label justifications:

  • P3: This is a low-risk test-reliability improvement with no runtime or user-facing behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The linked Blacksmith Testbox run exercises the actual changed CI test 20 times with 740 passing assertions, directly demonstrating stable after-fix behavior on the relevant hosted runner surface.
  • proof: sufficient: Contributor real behavior proof is sufficient. The linked Blacksmith Testbox run exercises the actual changed CI test 20 times with 740 passing assertions, directly demonstrating stable after-fix behavior on the relevant hosted runner surface.
Evidence reviewed

PR surface:

Tests +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 2 1 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 2 1 +1

What I checked:

  • Changed test contract: The branch changes only the timeout in the descendant-cleanup test while retaining the existing assertions for timeout termination, forced process-tree cleanup, PID capture, and observed descendant death. (src/process/exec.test.ts:505, 83f508a0a33d)
  • Current-main behavior: The reviewed base still uses a 50 ms timeout, so the CI race addressed by this PR is not already solved on current main. (src/process/exec.test.ts:505, b91a33d14a67)
  • Owner-boundary check: runCommandBuffered delegates to runCommandWithTimeout with killProcessTree: true; changing the test timing rather than production process cleanup keeps the repair at the correct test boundary. (src/process/exec.ts, b91a33d14a67)
  • Repeated real CI proof: The PR links Blacksmith Testbox run 29301060199, reporting 20 of 20 full-file repetitions and 740 passing assertions on the changed behavior; the PR's Real behavior proof check also succeeded. (f919d0c1e070)
  • Re-review continuity: The previous ClawSweeper cycle reported no findings at 83f508a; the subsequent commit only merged current main, and no previously fixed or still-open finding needs to be re-raised. (src/process/exec.test.ts:505, f919d0c1e070)
  • Repository policy application: The full root policy was applied: test and CI stability is an explicit project priority, comments should preserve non-obvious timing invariants, and protected maintainer-labeled items require explicit maintainer handling. (AGENTS.md, b91a33d14a67)

Likely related people:

  • steipete: The history shows recent merged CI reliability work including 856e1ab, b933929, and b434342, and this patch directly maintains the process cleanup test. (role: recent CI and test-infrastructure contributor; confidence: medium; commits: 83f508a0a33d, 856e1ab, b933929; files: src/process/exec.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-07-14T02:43:07.279Z sha 83f508a :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jul 14, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready on current head f919d0c1e070eacbd9068e06446abb2e1a532fb2.

The test still asserts timeout termination, descendant PID capture, forced descendant cleanup, and observed descendant death. Runtime code is unchanged.

@steipete
steipete merged commit 704b17d into main Jul 14, 2026
99 checks passed
@steipete
steipete deleted the codex/harden-descendant-timeout-test branch July 14, 2026 03:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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