Skip to content

worker_threads: honor --no-addons in execArgv after value-taking flags - #32362

Open
robobun wants to merge 9 commits into
mainfrom
farm/e1cad303/worker-execargv-no-addons
Open

worker_threads: honor --no-addons in execArgv after value-taking flags#32362
robobun wants to merge 9 commits into
mainfrom
farm/e1cad303/worker-execargv-no-addons

consume value tokens unconditionally; handle chained-short clusters

348c942
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 15, 2026 in 13m 45s

Code review found 2 potential issues

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/runtime/jsc_hooks.rs:1524-1527 Bare '-' token not treated as positional, diverging from StreamingClap
🟡 Nit src/runtime/jsc_hooks.rs:1498-1504 OneOptional short mid-cluster: scanner keeps chaining where StreamingClap stops

Annotations

Check warning on line 1527 in src/runtime/jsc_hooks.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Bare '-' token not treated as positional, diverging from StreamingClap

A bare `'-'` token isn't treated as a positional here, but `StreamingClap::parse_next_arg` (streaming.rs:308) classifies both `b"--"` and `b"-"` as `ArgKind::Positional`, so under `stop_after_positional_at = 1` the reference parser stops at `'-'` while this scanner continues past it — for `['-', '--no-addons']` the two diverge (this one disables addons, StreamingClap leaves them enabled). It errs in the safe direction and the input is implausible, but the rewritten comment 'first positional ends

Check warning on line 1504 in src/runtime/jsc_hooks.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

OneOptional short mid-cluster: scanner keeps chaining where StreamingClap stops

The chained-short walk treats `Values::OneOptional` like `Values::None` (`continue`), but `StreamingClap::chainging` stops chaining whenever `takes_value != None` (streaming.rs:231) and returns `{value: None}` for `OneOptional` (streaming.rs:245-251), silently dropping the rest of the cluster. For `['-cr', '--no-addons']` (`-c` is `--config <PATH>?`, the only `OneOptional` short in `RUN_PARAMS`) the reference parser drops the `'r'` and sees `--no-addons`, while this scanner walks to `'r'`, retur