feat(fu2b): flag PROC_MISMATCH (case_number prefix vs proceeding_type) for chair
Dry-run surfaced 2 rows with בל"מ prefix but proceeding_type=ערר. Since the migration strips the prefix, a wrong proceeding_type would silently lose the בל"מ signal — must be chair-adjudicated, not auto-applied. Chair table now flags 4 rows: 2 DUP_CHECK (8047-23) + 2 PROC_MISMATCH. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,3 +48,15 @@ def test_consistency_flag_when_bare_absent_from_citation():
|
||||
assert fu2b._consistency_flag("403-17", "ערר (...) 403/17 אהרון ברק") == "OK"
|
||||
assert fu2b._consistency_flag("403-17", "ערר (...) 1975/24 מישהו אחר") == "MISMATCH"
|
||||
assert fu2b._consistency_flag("403-17", "") == "NO_CITATION"
|
||||
|
||||
|
||||
def test_proc_mismatch_detects_prefix_vs_type_conflict():
|
||||
# case_number prefix disagrees with proceeding_type → must flag (prefix is
|
||||
# stripped by the migration, so a wrong proceeding_type loses the signal).
|
||||
assert fu2b._proc_mismatch('בל"מ 1010-01-25', "ערר") is True
|
||||
assert fu2b._proc_mismatch('בל"מ (...) 1028/20 חלוואני', "ערר") is True
|
||||
# agreement → no flag
|
||||
assert fu2b._proc_mismatch('ערר 1024/24 נילי', "ערר") is False
|
||||
assert fu2b._proc_mismatch('בל"מ 1010-01-25', 'בל"מ') is False
|
||||
# bare number with no prefix → nothing to contradict
|
||||
assert fu2b._proc_mismatch("8047/23", 'בל"מ') is False
|
||||
|
||||
Reference in New Issue
Block a user