feat(X11): citation-corroboration Phase 2 — wire the approval gate + backfill #33

Merged
chaim merged 3 commits from feat/x11-corroboration-phase2 into main 2026-06-01 04:43:25 +00:00
Showing only changes of commit b4d1fc5539 - Show all commits

View File

@@ -0,0 +1,26 @@
# X11 Phase 2 — Corroboration Backfill (2026-06-01)
`corroboration.build_all()` over the full corpus after wiring the approval gate.
## Result
```
{"precedents": 12, "citations": 26, "linked": 20, "approved": 0, "demoted": 0}
```
## Treatment distribution (20 stored links)
- followed: 18 · explained: 1 · mentioned: 1 · **negatives: 0**
## Per-halacha corroboration
- 14 halachot carry corroboration rows; **4 are corroborated** (≥2 distinct positive sources, 0 negatives).
- **All 14 were already `approved`** (13 by confidence ≥0.80, 1 by דפנה).
## Why 0 approved / 0 demoted (correct, not a bug)
- **0 approved:** `approve_halacha_by_corroboration` only transitions `pending_review`. Every corroborated halacha was already approved → nothing to promote this run. The citation-corroboration set currently **fully overlaps** the confidence-approved set.
- **0 demoted:** the corpus has **no negative treatments** → nothing overruled to demote.
## Verification
- Counts before == after (approved=1415, pending=196, published=0, rejected=1) — idempotent, no chair-final state touched.
- Approve path proven end-to-end in a **rolled-back transaction**: a corroborated halacha set to `pending_review` flipped back to `approved` with reviewer `corroborated (2 judicial citations ≥ 2)`; prod row restored.
## Going-forward value
The corroboration approval path matters for (a) future halachot extracted **below** the confidence threshold but **citation-corroborated**, and (b) **overruled-demotion** once negative treatment appears in the citation graph. Re-runnable anytime via the `corroboration_rebuild` MCP tool (empty arg = full backfill).