Decide aura run arg-parse strictness: trailing args after 'run' are silently accepted #16

Closed
opened 2026-06-04 20:55:42 +02:00 by Brummel · 0 comments
Owner

Fieldtest 0010 (#8) found that 'aura run extra-garbage' prints the full JSON report and exits 0 — the arg parse keys only on the first token being 'run' and ignores the rest.

context: the 0010 cycle_scope said 'any other or missing subcommand -> usage + exit 2', which does not unambiguously cover 'run '. The binary chose the lenient reading; the strict reading (unexpected trailing token -> usage + exit 2) is equally plausible and is what a user who typos 'aura run --sweep' would expect (today they get a silent full run instead of a hint). Either ratify the lenient contract with a one-line rustdoc note on the aura crate, or tighten main to reject unexpected tokens.

depends on: nothing — a small CLI contract decision + doc/code one-liner.

Fieldtest 0010 (#8) found that 'aura run extra-garbage' prints the full JSON report and exits 0 — the arg parse keys only on the first token being 'run' and ignores the rest. context: the 0010 cycle_scope said 'any other or missing subcommand -> usage + exit 2', which does not unambiguously cover 'run <junk>'. The binary chose the lenient reading; the strict reading (unexpected trailing token -> usage + exit 2) is equally plausible and is what a user who typos 'aura run --sweep' would expect (today they get a silent full run instead of a hint). Either ratify the lenient contract with a one-line rustdoc note on the aura crate, or tighten main to reject unexpected tokens. depends on: nothing — a small CLI contract decision + doc/code one-liner.
Brummel added the idea label 2026-06-04 20:55:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#16