Repository navigation
fix(scripts): treat whitespace-only force-kill delay as unset - #120284
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 7, 2026, 2:56 PM ET / 18:56 UTC. ClawSweeper reviewWhat this changesThe PR normalizes the wrapper’s optional force-kill delay before checking for an unset value, so whitespace-only inherited values use the existing five-second default. Merge readinessNo blocking findings. Current main still rejects whitespace-only delay values before spawning the child command; this exact-head repair restores the existing default behavior with direct terminal proof and should remain open for normal merge gating. Priority: P2 Review scores
Verification
How this fits togetherThe environment wrapper validates inherited shutdown timing before it launches a child command. The parsed delay controls cleanup timing for package scripts, gateway development, builds, and test commands. flowchart LR
A[Inherited environment] --> B[Environment wrapper]
B --> C[Delay parser]
C --> D{Blank or numeric?}
D -->|Blank| E[Five-second default]
D -->|Numeric| F[Validated capped delay]
E --> G[Child command lifecycle]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceTests +1, Other 0. Total +1 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Merge this narrow parser repair through GitHub’s normal exact-head required-check and clean-merge gate, preserving the five-second default for blank values and strict validation for nonblank values. Do we have a high-confidence way to reproduce the issue? Yes. Current source shows that whitespace reaches the validation error before spawn, and the PR body records the matching before/after real-wrapper result on current main and the exact head. Is this the best way to solve the issue? Yes. Trimming at the parser boundary before applying the existing unset default fixes the defect without accepting malformed nonblank values or adding a parallel path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d448a25a8a87. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
Punchcard-Session: calm-harbor-willow-ty
07d2957 to
ced1a4a
Compare
|
@clawsweeper re-review Maintainer rewrite pushed at exact head |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review One exact-head retry after the prior queued review failed to publish. Review PR head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
Merged via squash.
|
…aw#120284) Punchcard-Session: calm-harbor-willow-ty Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where users running commands through
scripts/run-with-env.mjswould get an invalid configuration error before the child process started whenOPENCLAW_RUN_WITH_ENV_FORCE_KILL_MScontained only whitespace.Why This Change Was Made
The delay resolver now trims the optional environment value once and treats blank text as unset. Nonblank values still use the existing positive-integer validation and timer cap.
User Impact
Whitespace-only inherited values now use the existing 5000 ms force-kill grace period instead of preventing the wrapped command from starting.
Evidence
main(ab4761f3fc9a903646a6ac7346ae1091745de79a): running the real wrapper with a whitespace-only delay exited2, printedOPENCLAW_RUN_WITH_ENV_FORCE_KILL_MS must be a positive integer, and did not print the child process'sspawnedmarker.ced1a4a1662c646ee614199d600fb05cde7585bf): the same real-wrapper command exited0and printedspawned.250, the timer cap, and rejection of0,-1,1e3, and100ms.node scripts/run-vitest.mjs test/scripts/run-with-env.test.tspassed all 17 tests.0: https://github.com/openclaw/openclaw/actions/runs/312037936100.99.Production LOC: +2/-2 (net 0). Tests: +1/-0.
The local broad lint wrapper encountered an unrelated existing type error in
packages/terminal-core/src/ansi.tsbefore target lint. The authoritative Testbox changed gate subsequently passed the exact script lint, test-root typecheck, formatting, declaration, dependency, and boundary lanes without modifying that unrelated surface.Punchcard-Session: calm-harbor-willow-ty