sweep hygiene: reservoir-sampled failures file; CHRT/CITT stub sentinels
Two instrument defects from the full-run vet (task #28 item 7): 1. The failures file was a head-cap: the first 2,000 failing docs in scan order, so the vet queue only ever showed the alphabetically first courts and the corpus tail never appeared. Both pool shapes now reservoir-sample (Vitter's R, seed 47) inside _fold_record, and the sharded merge allocates the 2,000 slots across shard reservoirs proportionally to each shard's failure count (largest remainders fill the slack) - a uniform sample over ALL failures; the old merge kept whatever the first shards to finish had head-capped. 2. CHRT/CITT provider catalog cards whose Decision Content section states "There is no document available for this decision." / "Il n'y a pas de document disponible pour cette décision." (en 185 + fr 186 docs, probed 2026-07-30) were counted as no_addressable_structure failures. They now classify as structure kind stub_sentinel - a provider inventory fact, not a detector miss - matched only in the document tail where the provider layout puts the sentinel, so a decision QUOTING the phrase stays a real document. Verification: smoke-tier cases sweep green (5,096 docs, 77.8s; the 1,331-row failures file now spans 25 distinct courts). Targeted scan of 20 real sentinel docs across CHRT/CITT en+fr: 20/20 classify stub_sentinel with zero fail flags; a long real CHRT decision and the same decision with the sentinel phrase spliced MID-text both stay "paragraphs" (the tail anchor holds). The shard-vs-legacy equivalence gate is untouched by the sampling change - both pool shapes fold through the same _fold_record and the compared aggregates carry no failure rows. Left open from item 7, deliberately: the competition-rule redesign for the three true mis-selection classes (length-beats-style hijack, gap-splice chimera, collapsed-fragment lock). That is a measured detector change gated on the narrow-flag queue as its eval set - the same discipline as dbb7b355 - not an instrument fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012AgUm5EcRKbT3duVFMbrQD
| Repository | eliziff/Beaver |
|---|---|
| Author | Eli Ziff <eliasziff@gmail.com> |
| Authored | |
| Parents | a0baf300 |
| Stats | 1 file changed , +51 , -3 |
| Part of | Deterministic legal-text tools ("SLA audit organs") |
Capture this commit into my fork
Download a Markdown prompt that tells Claude how to port this
exact commit into your working tree. Run it via
claude -p < capture-commit-ed8f6f0c.md
from inside the repo you want the change in.