feat(parse): add narrow token boundary controls - #1097
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 |
8630b5d to
f3f5c39
Compare
e505788 to
39704e2
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 39704e2. Configure here.
Instruction counts
No instruction-count regression above 1%. 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
|

Adds portable, typed support for clap-compatible token boundaries:
allow_negative_numbersfor positional and flag values without accepting arbitrary dash-prefixed wordsvalue_terminatorfor variadic flags and positionalsLeaves
dont_delimit_trailing_valuesas the remaining distinct PLAN gap.Validation:
cargo test --all --all-featuresgo test ./...This pull request was generated by Codex.
Note
Medium Risk
Core argv binding semantics change (negative numbers now require opt-in), with coordinated updates across Rust, Go, KDL, and the clap bridge; behavior is heavily tested but migrations may need explicit
allow_negative_numberson affected args.Overview
Introduces portable
allow_negative_numbersandvalue_terminatorso clap-style token boundaries can be declared on flags and positionals and carried through KDL, the derive, static tables, usage-lib, usage-argv, generated Go, and the clap bridge.allow_negative_numbersis opt-in: dash-prefixed tokens are treated as flags unless a value-taking field explicitly allows negative numeric tokens (e.g.--jobs -1without swallowing--force). Corpus and parser tests were updated because negative numbers are no longer accepted implicitly everywhere.value_terminatorends a variadic flag or positional at a given token without binding that token (e.g.--include a ; tail).Fidelity reporting no longer flags these as bridge losses when they round-trip;
dont_delimit_trailing_valuesremains the outstanding PLAN gap.Reviewed by Cursor Bugbot for commit 2339b2a. Bugbot is set up for automated code reviews on this repo. Configure here.