Repository navigation
Description
Failure
Related: #158136. A pre-existing process test failed in the full native validation run on local candidate dc1e8117ea01cb9362ecfbed6f8e386b2ec47888 (source tree 18930555ea61b366f626e6d0c8e0035556a1f150). The implicated fixture and process helpers are unchanged from pinned main 5d95277. Current main consolidation #158919 changes the case table but retains this failing scenario and waiting sequence.
Full-run allocation, Blacksmith Testbox, Node 24.19.0, two concurrent projects and two Vitest workers:
- File: src/process/exec-spawn.test.ts
- Case: finishes an extinct retained group without signalling a reused root PID
- Failure at line 208: after waitForPidToExit(descendantPid) resolves true, isChildProcessTreeAlive(child) returned true instead of false.
- The process shard reported 1 failed / 72 passed / 1 skipped files and 1 failed / 975 passed / 64 skipped cases.
Root cause and deterministic boundary proof
The fixture awaits the wrong completion condition. waitForPidToExit uses isPidAlive, which treats a known Linux zombie as no longer running. isChildProcessTreeAlive uses the kernel process-group probe, which still finds a group containing an unreaped zombie. A non-running member is not evidence that its group has disappeared.
A network- and PID-isolated probe imported the actual candidate helpers. A real child created its own session and exited; its parent used waitid(WEXITED | WNOWAIT) to retain the zombie, without timing sleeps. Observed:
{"kernelState":"Z","oldWaitResult":true,"groupAlive":true,"originalGroupAbsenceAssertionWouldPass":false,"groupGoneAfterActualReap":true}The final field was observed only after the real parent called waitpid. This deterministically falsifies the fixture assumption. The failing full run did not capture its process table, so the probe is a controlled counterexample, not a fabricated snapshot of that run.
Bounded verification / repair
An unchanged exact process-shard replay passed on a clean Testbox; this confirms the observed failure is intermittent, not that it is fixed. Allocation: https://github.com/openclaw/openclaw/actions/runs/36253637472 . An earlier replay invocation had a duplicate --config argument and ran no tests; it is not counted as a test result.
The narrow repair being verified in the PR work replaces the existing 2,000ms / 25ms PID-liveness wait with a wait for actual process-group absence, using the same deadline and interval. The case and its descendant-dead, unrelated-child-alive, and no-signals-to-reused-root assertions remain. No production code, test-scenario retries, expanded mocks, or longer timeout.
The changed file passed all 14 tests in 17.05s command wall time; independent whole-candidate P0–P3 review found no actionable defect. Whole-process and static verification are still running. The repair is not yet published or merged.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Sep 26, 2026
Codex review: this still needs some work. Reviewed September 26, 2026, 12:08 PM ET / 16:08 UTC.
Summary
Keep open. Current main still lets the PID wait finish before the process group disappears, so the retained-zombie counterexample can make this test fail intermittently. The merged test consolidation retained the case, and the reported repair has not been published.
Reproducibility: yes. Current source exposes the mismatched wait conditions, and the reported retained-zombie probe supplies a concrete failing boundary; this read-only review did not run the test.
Regression provenance
Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.
Next step
No published PR currently contains the source-proven fixture repair, and one focused test-only change has a clear validation path.
Review details
Best possible solution:
Wait for actual process-group absence within the existing bound, preserving the descendant-dead, unrelated-child-alive, and no-signal-to-reused-PID assertions.
Do we have a high-confidence way to reproduce the issue?
Yes. Current source exposes the mismatched wait conditions, and the reported retained-zombie probe supplies a concrete failing boundary; this read-only review did not run the test.
Is this the best way to solve the issue?
Yes. A bounded wait on the group condition the test actually asserts is narrower than changing production cleanup or weakening the scenario.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 8c7f9e12080d.
Label changes
Label changes:
P2: An intermittent false failure disrupts native validation, with no demonstrated user-facing runtime regression.impact:other: The affected outcome is unreliable maintainer test validation rather than an owned user-impact class.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P2: An intermittent false failure disrupts native validation, with no demonstrated user-facing runtime regression.impact:other: The affected outcome is unreliable maintainer test validation rather than an owned user-impact class.Evidence reviewed
Acceptance criteria:
What I checked:
src/process/exec-spawn.test.ts:211, 8c7f9e12080d)src/test-utils/process-tree.ts:22, 8c7f9e12080d)src/shared/pid-alive.ts:113, 8c7f9e12080d)src/process/child-process-tree.ts:10, 8c7f9e12080d)src/process/exec-spawn.test.ts:211, 8af7f3e640b7)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.clawsweeper commentedon Sep 26, 2026
🦞⚠️
Automatic implementation stopped before completion.
Reason: The automatic implementation worker stopped before all deterministic gates completed. Open the workflow run for the exact blocker.
Worker: https://github.com/openclaw/clawsweeper/actions/runs/36254513981