Repository navigation
fix(cli): reject non-decimal native UI and command deadline options - #8920
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThis PR applies the existing decimal-token parser to native UI scope options and native deadlines.
Reviews (1) · Last reviewed commit: "fix(cli): reject non-decimal native UI a..." · Reviewed by Greptile |
Summary
The native UI scope options and the native-command deadline use numeric coercion. Values such as
--pid=0x10and--native-command-timeout-ms=1e3pass argument validation. The compiled CLI then reaches target and capability lookup instead of refusing the token.No linked issue. Found while reviewing the numeric options left after #7376.
Problem and expected behavior
These options take decimal integers. A non-decimal token should fail argument validation on its own field.
Change and scope
pid,windowId,maxNodesand the native UI and native-command deadlines insrc/cli/utilityCommands.tsnow use the existing decimal-token parser.VALIDATION_ERRORon the matching field.Follow the contribution scope. Ordinary fix within existing boundaries; maintainer scope decision not applicable.
Contract and boundary impact
utilityCommands.ts.docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
The change only refuses arguments earlier; none of the effects above is new.
Evidence and regression coverage
tests/boundary/cli/utilityIntegerOptions.test.ts.--pidruns six non-decimal spellings.--window-id,--max-nodes,--native-ui-deadline-msand--native-command-timeout-msshare the parser and run0x10each. Deadline and PID bounds and decimal controls are covered once.src/cli/utilityCommands.tsreset tomain(89317a3), the file gives 10 failed / 2 passed. On this branch, 12/12 passed.--pid=0x10now fails withVALIDATION_ERRORonpidbefore any target lookup.Validation performed
Windows 11 x64 (10.0.26200), Node 24.22.1, base
main89317a3.npm run test:focused -- tests/boundary/cli/utilityIntegerOptions.test.ts— 12/12 passed. With the source reset tomain: 10 failed / 2 passed.npm run check:fast(typecheck and lint) — passed.Compatibility, safety, and release
Prepared with AI assistance.
Author readiness
Human owner: @Plastic-time
Before merge
type(scope): outcome.