feat(citation-verify): backend for "אימות פסיקה" — per-argument support + verify gate (#154) #323

Merged
chaim merged 1 commits from worktree-citation-verify-backend into main 2026-06-20 18:08:47 +00:00
Owner

החצי-backend של טאב "אימות פסיקה" (ה-frontend ב-PR נפרד).

  • סכמה V44: case_precedents מקבל argument_id (הטיעון שהפסיקה תומכת בו), case_law_id (פס"ד-הקורפוס — ל-cited_by + dedup), verified (שער-ה-INV-AH שה-writer מכבד) + verified_at. הכל nullable; chair_note כבר היה.
  • db: create_case_precedent(+השדות), set_case_precedent_verified, list_case_precedents(+עמודות).
  • services/case_citation_verification.build_view: לכל legal_argument → הצעות-קורפוס (search_library per-issue) כל אחת עם פירוק-הסמכות (db.citation_authority, X11) + מצב-אימות + רדאר per-issue (case_digest_radar מקובץ לפי סוגיה). קריאה/הרכבה בלבד; שימוש-חוזר בחיפוש-הקורפוס/שאילת-הסמכות/הרדאר (G2).
  • endpoints: 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 של טאב "אימות פסיקה" (ה-frontend ב-PR נפרד). - **סכמה V44:** `case_precedents` מקבל `argument_id` (הטיעון שהפסיקה תומכת בו), `case_law_id` (פס"ד-הקורפוס — ל-cited_by + dedup), `verified` (שער-ה-INV-AH שה-writer מכבד) + `verified_at`. הכל nullable; `chair_note` כבר היה. - **db:** `create_case_precedent`(+השדות), `set_case_precedent_verified`, `list_case_precedents`(+עמודות). - **`services/case_citation_verification.build_view`:** לכל `legal_argument` → הצעות-קורפוס (`search_library` per-issue) כל אחת עם פירוק-הסמכות (`db.citation_authority`, X11) + מצב-אימות + רדאר per-issue (`case_digest_radar` מקובץ לפי סוגיה). קריאה/הרכבה בלבד; שימוש-חוזר בחיפוש-הקורפוס/שאילת-הסמכות/הרדאר (G2). - **endpoints:** `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](https://claude.com/claude-code)
chaim added 1 commit 2026-06-20 18:08:40 +00:00
feat(citation-verify): backend for the "אימות פסיקה" panel — per-argument support + verify gate (#154)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 4s
Lint — undefined names / undefined-names (pull_request) Successful in 12s
5ede8a9653
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>
chaim merged commit abe4c53df1 into main 2026-06-20 18:08:47 +00:00
chaim deleted branch worktree-citation-verify-backend 2026-06-20 18:08:47 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ezer-mishpati/legal-ai#323