Repository navigation
fix: prevent refused update children from proceeding on EOF - #154289
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 changes before merge. Reviewed September 20, 2026, 11:04 PM ET / September 21, 2026, 03:04 UTC (Revision 2). ClawSweeper reviewWhat this changesThe process runner keeps rejected child input open during termination so EOF cannot trigger refused installer work, and adds a synchronized real-process regression. Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: the repair addresses a race still present on current main and the latest release, with no introduced correctness finding. The updated evidence explains the outstanding validation failures but does not yet supply their owning fixes. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's process runner starts update helpers and releases their input after an admission check. When admission fails, its termination owner stops and joins the child before returning the refusal. flowchart TD
A[Update helper request] --> B[Spawn child with input withheld]
B --> C{Admission allowed?}
C -->|Yes| D[Deliver input and EOF]
C -->|No| E[Keep input withheld]
E --> F[Terminate and join child]
F --> G[Return original refusal]
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +81. Total +81 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep refused input withheld through the existing termination owner, preserve admitted EOF behavior, and consolidate the overlapping repair into one landing path. Do we have a high-confidence way to reproduce the issue? Yes: source identifies premature EOF before cancellation, and the synchronized child regression targets that schedule. The PR reports before/after Linux results; this review did not execute them. Is this the best way to solve the issue? Yes: removing the premature close repairs the existing input owner without adding cancellation machinery or changing successful input delivery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6bb897a7231a. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer validation update for unchanged head
Review disposition: the artifact-fix request is resolved, and the validation request is satisfied by the exact-head runtime, control and qualification evidence. A speculative sparse-release code repair is skipped because no owning defect has been established and that path bypasses this PR's changed catch. Named follow-up: diagnose the original 120-second sparse release-tooling timeout in |
What Problem This Solves
Fixes a child-process race during
openclaw update: an installer refused at input admission could still execute its EOF-triggered work while cancellation was starting.Sighting: main run 35551129586, job 106186821184,
checks-node-compact-small-24,agentic-cli/cli, head4c63f0046ad5d63104c2b7ca6252fb685e39e0c1. The failing case wasrefuses Node provisioning after options-replaced at at-inputinupdate-command-executor-auxiliary.test.ts.User Impact
Refused child input remains withheld while the existing process owner terminates and joins the child. The refusal, process-tree cleanup, update recovery behavior, and existing time budgets remain intact. No public contract, state schema, durability, retention, or permission changes.
Why This Change Was Made
The refusal assertion already passed. The failed assertion expected
fs.existsSync(effect)to befalsebut receivedtrue. The process runner destroyed stdin before requesting cancellation; EOF released the fake installer's synchronous stdin read, allowing its effect to race termination.Remove that premature destruction at the process owner. A real-process regression waits for the child's ready output before rejecting admission, then verifies the original refusal, absence of the effect, forced cleanup, and process death. The original auxiliary assertions and CLI fixtures are unchanged; no retries, sleeps, timeout increases, or planner changes.
This is the focused extraction of the same EOF repair independently identified in the unpublished
ci-burden/h7-cli-workerswork. H7's broader process and CLI fixture changes remain outside this PR.Evidence
tbx_01m30v2qq3k9xk71hj11xazdbp, environment run: deterministic regression fails on original production code at the no-effect assertion, then passes with this repair. Original auxiliary file before and after the fix: 0 failures / 20 standalone runs each atOPENCLAW_VITEST_MAX_WORKERS=8.pnpm test src/process/exec-input-admission.test.ts --maxWorkers=1took 107.87 s wall, including shared subprocess-build preparation; the test itself took 424 ms.typescript/no-floating-promises.node scripts/check-changed.mjs, formatting, andgit diff --checkpassed. Pre-commit and final branch reviews: no actionable P0–P2 findings.checks-node-compact-small-17/core-runtime-infra-process.agentic-cligroup at its captured two-worker policy: 382 files passed, one skipped, one failed; all 24 auxiliary cases passed. The single failure is the unchanged artifact-cleanup case inupdate-command-artifact.test.ts, receivingFsSafeErrorinstead ofAggregateError. The Testbox reports umask0002; H7 has a controlled reproducer and an unpublished repair at the sharedsrc/test-helpers/temp-dir.tsproducer. The failure occurs during workspace creation, before the mocked staging callback, and does not execute the changed admission path. Three clean group runs remain blocked; no failed shard was retried to obtain green.checks-node-compact-small-45, timed out after 120 seconds intest/scripts/release-check.test.ts→loads sparse release tooling and checks the target worker contract. The release-tooling runtime closure contains neither changed file. This matches the unresolved F52 investigation; no owning repair PR exists yet. No hosted rerun was requested.tbx_01m30w0qp370n38ps7v0fw4jky, environment run. Both task leases are stopped. Initial shard-launch/config-routing attempts that did not exercise the CLI group are excluded from these results.