feat(spec): refuse a detached value when require_equals is set - #1013
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 |
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 5905697. 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
|
8e87ad0 to
086820b
Compare
086820b to
58d90b4
Compare
Accept --flag=value and refuse --flag value, which is clap's require_equals and aube's --inspect. A short's attached form (-i9229, -i=9229) still binds. Spec, usage-lib, usage-argv, the derive attribute, and the clap bridge all carry it. Co-authored-by: jeff <jeff@jdx.dev>
grouped_flag stayed set after a requeued short was fully consumed, so -ai 9229 bound 9229 instead of reporting the missing value. usage-argv already refused that line. Co-authored-by: jeff <jeff@jdx.dev>
The corpus already pins require_equals, and mise r test:go runs the whole corpus. Honour the bit in Go so those vectors fail here the same way they do in usage-lib. Co-authored-by: jeff <jeff@jdx.dev>
58d90b4 to
6ce760d
Compare
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> Stacked on #1013. `gen-shadow` was dropping `effect` on commands and flags. Help does not print it, so the fleet help gate never noticed; communique's markdown (`- **Effect**: read-only`) did. The usage dialect now writes `#[usage(effect = "…")]` on `Args` and on flags. clap still cannot hear it and counts it as dropped (198 of mise's commands). `benches/gate/tests/fleet.rs` holds communique's markdown and manpage to the checked-in spec. _This comment was generated by Claude Code._ <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-4de7e59e-aa2e-4ad0-a1d0-1c2e69c166db?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-4de7e59e-aa2e-4ad0-a1d0-1c2e69c166db&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <cursoragent@cursor.com>

Stacked on #1012.
Accept
--flag=valueand refuse--flag value, which is clap'srequire_equalsand aube's--inspect. A short's attached form (-i9229,-i=9229) still binds.Carried through the spec (
require_equals=#true), usage-lib, usage-argv (Flag::require_equals),#[usage(require_equals)], the clap bridge (Arg::is_require_equals_set), andgen-shadow.This comment was generated by Claude Code.