Problem
The top-level parser uses parseArgs({ strict: false }) and discards unrecognized entries from values. A misspelled option can make a command run a different mode while reporting success. This is especially misleading for verification commands.
Reproduction (built from current main, b037891)
Run aether doctor --lve --json (typo for --live) in an empty local config directory. It exits 0 and returns "mode":"fast" with remote checks marked "not-checked". The doctor command's own unknown-argument validation never sees --lve, because main.ts stripped it first. aether --version --not-a-real-flag also exits 0.
src/commands/cli_registry.ts already documents this parser behavior for command flags: an undeclared flag “simply vanishes.” That comment explains why valid options are registered; it does not protect users from typos or stale scripts.
Expected
Reject unknown CLI options with a nonzero exit and a useful message before dispatch. Preserve intentional bare prompt/positional behavior and the -- delimiter. Cover a misspelled verification flag such as doctor --lve and a command with a value-taking flag in regression tests.
Problem
The top-level parser uses
parseArgs({ strict: false })and discards unrecognized entries fromvalues. A misspelled option can make a command run a different mode while reporting success. This is especially misleading for verification commands.Reproduction (built from current
main,b037891)Run
aether doctor --lve --json(typo for--live) in an empty local config directory. It exits 0 and returns"mode":"fast"with remote checks marked"not-checked". The doctor command's own unknown-argument validation never sees--lve, becausemain.tsstripped it first.aether --version --not-a-real-flagalso exits 0.src/commands/cli_registry.tsalready documents this parser behavior for command flags: an undeclared flag “simply vanishes.” That comment explains why valid options are registered; it does not protect users from typos or stale scripts.Expected
Reject unknown CLI options with a nonzero exit and a useful message before dispatch. Preserve intentional bare prompt/positional behavior and the
--delimiter. Cover a misspelled verification flag such asdoctor --lveand a command with a value-taking flag in regression tests.