mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 16:46:24 +00:00
The guard in the four bunli-based CLIs inspected only tokens starting with `--`, so an undefined short flag bypassed it: bunli discarded it, the search ran unfiltered, and the CLI exited 0. Live against jobnet, `search -q "sygeplejerske"` returned all 18,179 ads as a successful search against 667 for the real `--search-string` query - the same shape as review finding F13 that motivated the guard. Both dash forms are now checked. Declared shorts (jobindex's -q) and bunli's built-in -h/-v stay valid. A negative number is rejected too: bunli discards a `-`-prefixed token rather than consuming it as the previous flag's value, so `--radius -5` silently fell back to the default instead of failing its own min(1) schema; a value that must begin with a dash uses the `--flag=value` form. Fixes #426. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>