fix(corpus): committee decisions are persuasive, never binding (INV-DM7) #306

Merged
chaim merged 1 commits from worktree-committee-binding into main 2026-06-20 10:53:28 +00:00
Owner

מה

החלטות ועדת-ערר (source_kind=internal_committee / source_type=appeals_committee) הן סמכות משכנעת — אינן מחייבות ועדה אחרת ולא את הוועדה עצמה. עמודת is_binding הנשמרת ברירת-מחדלה הייתה שגויה (True) בשכבות הטופס + service/db, כך ש-46 מתוך 92 החלטות-ועדה סומנו "מחייבות" וקיבלו את פרומפט-החילוץ ה-BINDING.

הפתרון מיישר עם INV-DM7 (סמכות מבנית, נרמול-במקור) ועם דרישת היו"ר: ברירת-מחדל false להחלטות-ועדה, היפוך הקיימות, ואיסור-קשיח שלא יחזור.

שינויים

  • db.create_internal_committee_decision — כפיית is_binding=False (מבני)
  • db.create_external_case_law — כפיית False כש-source_type=appeals_committee
  • db.update_case_law — כפיית False כשפאטץ' מסווג-מחדש ל-appeals_committee (מסלול Gemini)
  • internal_decisions.migrate_from_external_corpusis_binding=FALSE ב-UPDATE של סיווג-מחדש
  • ברירות-מחדל service + טופס FastAPI /internal-decisions/upload: True → False
  • SCHEMA_V42 — backfill (היפוך 46 רשומות-מורשת) + CHECK case_law_committee_not_binding_check (כך שרשומת-ועדה מחייבת לא תיכתב שוב לעולם)
  • ספ: X8-field-provenance יושר ל-INV-DM7

אימות (מול ה-DB החי, בטרנזקציה עם ROLLBACK)

  • 46 רשומות-ועדה מחייבות → 0 לאחר ה-backfill
  • court_ruling (239) + cited_only (31) לא מושפעות — נשארות מחייבות
  • ניסיון INSERT של רשומת-ועדה מחייבת נדחה ע"י האילוץ
  • קומפילציה: OK · כשלי-הבדיקות הקיימים (HALACHA_PANEL_MAX_NEW) אינם קשורים

Invariants

INV-DM7 (סמכות ⊥ תפקיד-כלל) · G1 (נרמול-במקור) · G2 (מקור-אמת יחיד, אין מסלול מקביל)

הערה ליו"ר

ההחלטות הקיימות שכבר נחלצו כ-BINDING (658 הלכות מ-43 החלטות) לא מחולצות-מחדש אוטומטית — ה-approved נשמרות (INV-G10), וההחלטה על חילוץ-מחדש פתוחה ותלוית-עלות.

🤖 Generated with Claude Code

## מה החלטות ועדת-ערר (`source_kind=internal_committee` / `source_type=appeals_committee`) הן **סמכות משכנעת** — אינן מחייבות ועדה אחרת ולא את הוועדה עצמה. עמודת `is_binding` הנשמרת ברירת-מחדלה הייתה שגויה (`True`) בשכבות הטופס + service/db, כך ש-**46 מתוך 92** החלטות-ועדה סומנו "מחייבות" וקיבלו את פרומפט-החילוץ ה-BINDING. הפתרון מיישר עם **INV-DM7** (סמכות מבנית, נרמול-במקור) ועם דרישת היו"ר: ברירת-מחדל `false` להחלטות-ועדה, היפוך הקיימות, ואיסור-קשיח שלא יחזור. ## שינויים - `db.create_internal_committee_decision` — כפיית `is_binding=False` (מבני) - `db.create_external_case_law` — כפיית False כש-`source_type=appeals_committee` - `db.update_case_law` — כפיית False כשפאטץ' מסווג-מחדש ל-`appeals_committee` (מסלול Gemini) - `internal_decisions.migrate_from_external_corpus` — `is_binding=FALSE` ב-UPDATE של סיווג-מחדש - ברירות-מחדל service + טופס FastAPI `/internal-decisions/upload`: `True → False` - **SCHEMA_V42** — backfill (היפוך 46 רשומות-מורשת) + `CHECK case_law_committee_not_binding_check` (כך שרשומת-ועדה מחייבת לא תיכתב שוב לעולם) - ספ: `X8-field-provenance` יושר ל-INV-DM7 ## אימות (מול ה-DB החי, בטרנזקציה עם ROLLBACK) - 46 רשומות-ועדה מחייבות → 0 לאחר ה-backfill - `court_ruling` (239) + `cited_only` (31) **לא מושפעות** — נשארות מחייבות - ניסיון INSERT של רשומת-ועדה מחייבת **נדחה** ע"י האילוץ - קומפילציה: OK · כשלי-הבדיקות הקיימים (`HALACHA_PANEL_MAX_NEW`) אינם קשורים ## Invariants INV-DM7 (סמכות ⊥ תפקיד-כלל) · G1 (נרמול-במקור) · G2 (מקור-אמת יחיד, אין מסלול מקביל) ## הערה ליו"ר ההחלטות הקיימות שכבר נחלצו כ-BINDING (658 הלכות מ-43 החלטות) **לא** מחולצות-מחדש אוטומטית — ה-approved נשמרות (INV-G10), וההחלטה על חילוץ-מחדש פתוחה ותלוית-עלות. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaim added 1 commit 2026-06-20 10:53:21 +00:00
fix(corpus): committee decisions are persuasive, never binding (INV-DM7)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 4s
Lint — undefined names / undefined-names (pull_request) Successful in 9s
5a69980adf
ועדת-ערר decisions (source_kind=internal_committee / source_type=
appeals_committee) are persuasive authority — they do not bind another
committee, nor the committee itself. The stored is_binding column wrongly
defaulted to True across the FastAPI form + service/db layers, so 46 of 92
committee rows were marked binding and got the BINDING halacha-extraction
prompt. Authority is structural for this source (INV-DM7) — normalize at the
source (G1), not trust the input.

Changes:
- db.create_internal_committee_decision: coerce is_binding=False (structural)
- db.create_external_case_law: coerce False when source_type=appeals_committee
- db.update_case_law: coerce False when a patch relabels source_type=
  appeals_committee (Gemini reclassification path)
- internal_decisions.migrate_from_external_corpus: set is_binding=FALSE on
  the external→internal reclassification UPDATE
- service + FastAPI-form defaults: True → False for the internal path
- SCHEMA_V42: backfill legacy committee rows (is_binding True→False) +
  CHECK constraint case_law_committee_not_binding_check so a binding
  committee row can never be written again ("so it doesn't recur")
- spec: X8-field-provenance aligned to INV-DM7

Verified against live DB in a rollback transaction: 46 rows flip to 0;
court_ruling (239) + cited_only (31) unaffected; binding-committee INSERT
rejected by the constraint.

Invariants: INV-DM7 (authority ⊥ rule-type) · G1 (normalize at source) ·
G2 (single source of truth, no parallel path).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chaim merged commit 9e0f483e83 into main 2026-06-20 10:53:28 +00:00
chaim deleted branch worktree-committee-binding 2026-06-20 10:53:28 +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#306