feat(parse): add subcommand value precedence - #1105
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8f506a7 to
dd0f5ac
Compare
dd0f5ac to
cad6a2a
Compare
cad6a2a to
c85f61e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c85f61e. Configure here.
c85f61e to
f98a59c
Compare
f98a59c to
259e957
Compare
259e957 to
f3c8270
Compare
Instruction countsNothing was compared, and so nothing was gated. No series appears on both sides: either the base has no measurements recorded, or the two were measured on different runner classes, which are deliberately not comparable — counts shift between machine types by more than a real regression does. New, nothing to compare against: Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
f3c8270 to
936ef16
Compare
936ef16 to
f89dcf4
Compare
f89dcf4 to
e4c0c41
Compare

Summary
subcommand_precedence_over_argacross KDL, typed Rust, usage-lib, clap conversion, and generated/runtime GoVerification
cargo test --all --all-featurescargo clippy --all --all-features -- -D warningsgo test ./...(fromgo/)AI-generated pull request.
Note
Medium Risk
Changes argv routing in Rust and Go parsers, but behavior is opt-in per command and covered by new tests; main risk is subtle interaction with variadic flags, positionals, and
args_conflicts_with_subcommands.Overview
Adds clap-aligned
subcommand_precedence_over_argend-to-end. When a command sets it, a recognized subcommand token can stop an in-progress variadic value owner instead of being swallowed as another value; default stays off, so existing CLIs are unchanged unless they opt in.Parsing changes land in
usage-argvandusage-lib(plus generated Go): an early subcommand check while variadic collection is active, withargs_conflicts_with_subcommandsstill blocking parent args + child selection. Metadata flows throughCommand/ spec KDL,#[command(subcommand_precedence_over_arg)], conformance tables, and clap bridge/spec emission;clap_usageno longer reports this as a fidelity loss.Docs, migration notes, and tests (including typed
Precedence+ KDL variadic-flag case) cover the new policy;allow_missing_positionalremains the open parsing-policy gap inPLAN.md.Reviewed by Cursor Bugbot for commit e4c0c41. Bugbot is set up for automated code reviews on this repo. Configure here.