feat(citation-verify): backend for "אימות פסיקה" — per-argument support + verify gate (#154) #323
Reference in New Issue
Block a user
Delete Branch "worktree-citation-verify-backend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
החצי-backend של טאב "אימות פסיקה" (ה-frontend ב-PR נפרד).
case_precedentsמקבלargument_id(הטיעון שהפסיקה תומכת בו),case_law_id(פס"ד-הקורפוס — ל-cited_by + dedup),verified(שער-ה-INV-AH שה-writer מכבד) +verified_at. הכל nullable;chair_noteכבר היה.create_case_precedent(+השדות),set_case_precedent_verified,list_case_precedents(+עמודות).services/case_citation_verification.build_view: לכלlegal_argument→ הצעות-קורפוס (search_libraryper-issue) כל אחת עם פירוק-הסמכות (db.citation_authority, X11) + מצב-אימות + רדאר per-issue (case_digest_radarמקובץ לפי סוגיה). קריאה/הרכבה בלבד; שימוש-חוזר בחיפוש-הקורפוס/שאילת-הסמכות/הרדאר (G2).GET /api/cases/{n}/citation-verification+POST .../verify(upsert אימות/ביטול + הערת-יו"ר).אומת על 1044-03-26: 14 טיעונים, כולם עם תמיכה; 317/10 צף עם אומץ×11/אובחן×1; לידֵי-רדאר משויכים per-issue. auto-approval לא נגע (שער-יו"ר, INV-G10).
verifiedברירת-מחדל false — כלום אינו סמכותי עד שהיו"ר מאמת.Invariants: G2 · INV-AH (שער-אימות) · INV-G10 · INV-DIG1. ללא הסרת-נתונים.
🤖 Generated with Claude Code
Backend half of the citation-verification tab (frontend follows in a separate PR): - Schema V44: case_precedents gains argument_id (the legal argument it supports), case_law_id (the corpus ruling — for cited_by + dedup), verified (the INV-AH gate the writer respects) + verified_at. All nullable; chair_note already existed. - db: create_case_precedent(+argument_id/case_law_id/verified), set_case_precedent_verified(id, verified, chair_note), list_case_precedents(+cols). - services/case_citation_verification.build_view(case): per legal_argument → in-corpus suggestions (search_library per issue) each with the cited_by authority breakdown (db.citation_authority, X11) + merged attach/verify state + per-issue radar (case_digest_radar grouped by matched issue). Pure read/assembly; reuses the one corpus search + one authority query + one radar (G2). - endpoints: GET /api/cases/{n}/citation-verification (the view) and POST .../verify (upsert verify/un-verify + chair note). Validated on 1044-03-26: 14 arguments, all with support; 317/10 surfaces with אומץ×11/אובחן×1; radar leads attributed per issue. Auto-approval untouched (chair gate, INV-G10). Verify defaults to false — nothing is authoritative until the chair marks it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>