Commit 5c6c0a3
test(ledgers): enforce unique DISC ids and the expanded negative-evidence outcomes
Harden `scripts/check_ledgers.py` so the two ledger-integrity invariants that
the accompanying doc changes rely on are machine-checked, not just conventions.
check_negative_evidence: the entry regex previously hard-coded
`WIN|NEGATIVE(reverted)` in the outcome group, which silently skipped any row
using a different label. Capture the outcome generically and validate it against
the allowed set {WIN, PROVISIONAL_LOCAL_WIN, NEGATIVE(reverted),
NEGATIVE(retained-for-proof)}, emitting a per-entry `negative-outcome` check and
failing on anything else. This locks in the taxonomy just added to
docs/NEGATIVE_EVIDENCE.md and stops an unrecognized outcome from being counted.
check_discrepancies: capture each `## DISC-<n>:` heading id and add a
`disc-id-unique` check that fails on any duplicate id — the exact regression
(two DISC-004 entries) that was just repaired in docs/DISCREPANCIES.md. Guards
the ledger against a silent id collision recurring.
Both are additive validators over the existing checker structure; no other
behavior changes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 64d06ae commit 5c6c0a3
1 file changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
238 | 256 | | |
239 | 257 | | |
240 | 258 | | |
| |||
289 | 307 | | |
290 | 308 | | |
291 | 309 | | |
292 | | - | |
| 310 | + | |
293 | 311 | | |
294 | 312 | | |
295 | 313 | | |
296 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
297 | 322 | | |
298 | 323 | | |
299 | 324 | | |
| |||
0 commit comments