Commit 06cee53
reviewer-eval: fail closed on malformed empty CLI selectors (CI review P1)
CI Codex flagged a fail-open input gap: malformed selectors silently ran a different
matrix than intended.
- _resolve_configs dropped empty comma segments, so "A,", ",A", "A,,B" resolved to a
narrower-than-typed config set instead of erroring. It now rejects any empty segment.
- --strata is nargs="*", and load_cases treated [] as falsy ("no filter"), so a bare
--strata (or empty shell expansion) silently ran the WHOLE corpus. load_cases now
distinguishes None (no flag -> all strata) from [] (explicit empty -> match nothing),
so a bare --strata fails closed (0 cases selected -> non-zero exit).
Tests (+2, 80 total): _resolve_configs rejects "A,"/",A"/"A,,B"/""/","/"A, ,B" and still
accepts A,B and A; load_cases(None) loads all, load_cases([]) selects nothing, and a
single stratum still filters. (Sanity: `run --configs A --strata` now exits "no cases
selected".)
Verified: ruff clean (changed), black clean, 80 eval tests pass, verify-corpus 2/2.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5fb7c30 commit 06cee53
3 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1614 | 1614 | | |
1615 | 1615 | | |
1616 | 1616 | | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
0 commit comments