Repository navigation
fix(scripts): reject unsafe web-fetch benchmark counts - #119533
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 5:30 AM ET / 09:30 UTC. ClawSweeper reviewWhat this changesThe PR makes the web-fetch benchmark reject non-decimal and non-safe Merge readinessKeep open: current main still converts unsafe benchmark counts before validating them, and this focused parser-boundary fix addresses that behavior without a concrete patch defect. Priority: P3 Review scores
Verification
How this fits togetherThe web-fetch benchmark accepts operator CLI flags and turns its run and warm-up counts into benchmark loop bounds. Invalid values should fail at argument parsing before the benchmark creates tools or starts work. flowchart LR
A[Operator CLI flags] --> B[Benchmark argument validation]
B --> C[Count parser]
C --> D{Decimal safe integer?}
D -->|yes| E[Benchmark loops]
D -->|no| F[Flag-specific CLI error]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +14, Other +6. Total +20 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the validation local to this CLI parser so its existing flag-specific Do we have a high-confidence way to reproduce the issue? Yes: current main routes Is this the best way to solve the issue? Yes: the parser owns the conversion and error contract, while the shared strict helper would alter blank-value and error behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c02e39345bf6. 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)
|
Punchcard-Session: clear-orchard-lantern-bc
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper rank-up move disposition:
|
|
Merged via squash.
|
* fix(scripts): reject non-decimal benchmark counts * fix(scripts): reject unsafe benchmark counts Punchcard-Session: clear-orchard-lantern-bc --------- Co-authored-by: Vincent Koc <[email protected]>
Related: #98559
What Problem This Solves
Fixes an issue where operators running the web-fetch benchmark could pass scientific notation or decimal counts outside JavaScript's safe-integer range. Numeric coercion could otherwise expand or round the requested workload instead of rejecting invalid CLI input.
Why This Change Was Made
The benchmark now accepts only decimal digit text whose numeric value is a safe integer. Validation stays at the existing
--runsand--warmupparser boundary, preserving positive-run and non-negative-warmup semantics plus the existing stack-freeCliArgumentErrorexit-code-2 behavior.User Impact
Invalid benchmark counts such as
1e3and9007199254740993now fail immediately with the existing flag-specific error. Valid decimal counts continue to behave unchanged.Evidence
tbx_01kz8k3bns979q040h9pnxq5g9:pnpm test test/scripts/bench-web-fetch.test.tspassed all 6 process tests, including--runsand--warmupcoverage for scientific notation and the rounded unsafe decimal. Run: https://github.com/openclaw/openclaw/actions/runs/30992243935oxfmtpassed for both changed files.git diff --checkpassed.Provenance
The benchmark parser was introduced by PR #98559, squash commit
2f6459093ad3abe4369f686b517b5d78568af35a, merged on July 4, 2026. The affected implementation shipped inv2026.7.1-2andv2026.7.2-beta.7.Punchcard-Session: clear-orchard-lantern-bc