fix(agents): handle blank numeric params and LSP exits#100450
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 4:18 PM ET / 20:18 UTC. Summary PR surface: Source +14, Tests +40. Total +54 across 4 files. Reproducibility: yes. from source inspection: current main rejects blank optional finite-number strings and only fails LSP sessions on child-process errors, leaving successful-then-exited children to time out pending requests. I did not run a local repro because this review is read-only. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land this focused reliability fix after normal maintainer merge gates, keeping the behavior aligned with the sibling integer readers and the existing LSP session failure model. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main rejects blank optional finite-number strings and only fails LSP sessions on child-process errors, leaving successful-then-exited children to time out pending requests. I did not run a local repro because this review is read-only. Is this the best way to solve the issue? Yes: extending the existing blank-param helper to finite numbers and sharing one idempotent LSP failure path for AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 426010dfb9a2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +14, Tests +40. Total +54 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (1 earlier review cycle)
|
|
@clawsweeper re-review Added redacted real-behavior proof to the PR body for blank optional finite-number parsing and bundled LSP child-exit fast failure. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Source: #100450 Co-authored-by: morluto <[email protected]>
* fix(agents): harden LSP process failures Source: #100450 Co-authored-by: morluto <[email protected]> * fix(sandbox): report effective workspace layout Sources: #100435, #100439 Co-authored-by: Aniruddha Adak <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> * fix(security): fail install checks on stream errors Source: #100413 Co-authored-by: 陈宪彪0668000387 <[email protected]> * fix(android): normalize all-day calendar events Source: #100032 Co-authored-by: NianJiuZst <[email protected]> * fix(ios): serialize push-to-talk lifecycle Source: #99942 Co-authored-by: NianJiuZst <[email protected]> * fix(talk): reject inherited provider names Source: #99849 Co-authored-by: zenglingbiao <[email protected]> * fix(android): stop voice capture in background Source: #99840 Co-authored-by: xialonglee <[email protected]> * fix(cron): preserve fallback result classification Source: #99913 Co-authored-by: jincheng-xydt <[email protected]> * fix(google): bound Vertex response decompression Source: #99812 Co-authored-by: 黄剑雄0668001315 <[email protected]> * fix(plugins): report malformed discovery JSON Source: #99892 Co-authored-by: 陈宪彪0668000387 <[email protected]> * test(sandbox): configure non-default workspace fixture * test: fix small-fix batch validation --------- Co-authored-by: morluto <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: NianJiuZst <[email protected]> Co-authored-by: zenglingbiao <[email protected]> Co-authored-by: xialonglee <[email protected]> Co-authored-by: jincheng-xydt <[email protected]> Co-authored-by: 黄剑雄0668001315 <[email protected]>
|
Superseded by #100483, landed as aaf5ab9. The landed rewrite treats blank optional numeric inputs as absent and makes LSP requests fail deterministically across spawn errors, child exit, and stdout/stderr stream failures, with pending-request cleanup and focused lifecycle coverage. Exact-head proof passed 195 focused tests, changed-surface type/lint/guards, and hosted CI. Contributor credit from this PR is preserved in the landed commit. Thank you @morluto for the original fixes. |
|
Thanks @morluto — your report and patch were incorporated into the strengthened canonical fix in #100483, landed as aaf5ab9. The landed version also covers blank finite-number parameters, process/stdout/stdin failures, and the exit-vs-close ordering needed to preserve a final LSP response. Contributor credit is preserved. Closing this superseded PR. |
* fix(agents): harden LSP process failures Source: openclaw#100450 Co-authored-by: morluto <[email protected]> * fix(sandbox): report effective workspace layout Sources: openclaw#100435, openclaw#100439 Co-authored-by: Aniruddha Adak <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> * fix(security): fail install checks on stream errors Source: openclaw#100413 Co-authored-by: 陈宪彪0668000387 <[email protected]> * fix(android): normalize all-day calendar events Source: openclaw#100032 Co-authored-by: NianJiuZst <[email protected]> * fix(ios): serialize push-to-talk lifecycle Source: openclaw#99942 Co-authored-by: NianJiuZst <[email protected]> * fix(talk): reject inherited provider names Source: openclaw#99849 Co-authored-by: zenglingbiao <[email protected]> * fix(android): stop voice capture in background Source: openclaw#99840 Co-authored-by: xialonglee <[email protected]> * fix(cron): preserve fallback result classification Source: openclaw#99913 Co-authored-by: jincheng-xydt <[email protected]> * fix(google): bound Vertex response decompression Source: openclaw#99812 Co-authored-by: 黄剑雄0668001315 <[email protected]> * fix(plugins): report malformed discovery JSON Source: openclaw#99892 Co-authored-by: 陈宪彪0668000387 <[email protected]> * test(sandbox): configure non-default workspace fixture * test: fix small-fix batch validation --------- Co-authored-by: morluto <[email protected]> Co-authored-by: ZengWen-DT <[email protected]> Co-authored-by: 陈宪彪0668000387 <[email protected]> Co-authored-by: NianJiuZst <[email protected]> Co-authored-by: zenglingbiao <[email protected]> Co-authored-by: xialonglee <[email protected]> Co-authored-by: jincheng-xydt <[email protected]> Co-authored-by: 黄剑雄0668001315 <[email protected]>
What Problem This Solves
Fixes an issue where model-generated tool calls could fail when optional numeric fields were emitted as empty-string defaults instead of being omitted.
This affected finite-number inputs such as media quality, FPS, temperature, confidence, scoring thresholds, and file-size limits. It also fixes a bundled LSP runtime path where requests could wait for the full timeout if a language server started successfully and then exited.
Why This Change Was Made
This follows up on #100399, which fixed the same blank optional parameter behavior for positive and non-negative integer readers and added buffered LSP spawn-failure handling. The remaining sibling gaps were finite-number parameters and LSP processes that start successfully but then exit.
The finite-number reader now treats blank and whitespace-only strings as unset, while still rejecting nonblank invalid values. The bundled LSP runtime now routes process exits through the same session failure path as process errors, so pending and future requests reject immediately.
User Impact
Optional numeric tool fields can be left blank by model-generated tool calls without causing avoidable validation failures.
LSP-backed tools fail faster and more clearly when their server process exits unexpectedly, instead of waiting for the per-request timeout.
Evidence
createImageToolandcreateBundleLspToolRuntimeoutside Vitest. The script used a repo-relative media input plus a temporary bundle.lsp.jsonwhose stdio LSP child exits during hover:node scripts/run-vitest.mjs src/agents/tools/common.params.test.ts src/agents/agent-bundle-lsp-runtime.test.ts- passed, 2 filespnpm exec oxfmt --check --threads=1 src/agents/tools/common.ts src/agents/tools/common.params.test.ts src/agents/agent-bundle-lsp-runtime.ts src/agents/agent-bundle-lsp-runtime.test.ts- passedgit diff --check- passed