fix(corpus): חיפה is its own district, not folded into צפון (G2) #307
Reference in New Issue
Block a user
Delete Branch "worktree-haifa-district"
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?
מה
מחוז חיפה ומחוז הצפון הם מחוזות-תכנון נפרדים, כל אחד עם ועדת-ערר משלו. שני באגים קיפלו את חיפה לתוך צפון:
services/internal_decisions.py_VALID_DISTRICTSהשמיט "חיפה" (בעוד שכבת-ה-toolsVALID_DISTRICTSוגםdb.pyקיצור-הציטוט כן כוללים אותו — הפרת G2)_COURT_TO_DISTRICTמיפה"חיפה" → "צפון"תוצאה: 2 החלטות מחוז-חיפה (1074-08-23, 8508-03-24) הוסוו תחת צפון, ו"חיפה" לא הופיע כמחוז.
שינויים
"חיפה"ל-_VALID_DISTRICTS_COURT_TO_DISTRICT:("חיפה","צפון") → ("חיפה","חיפה")צפון → חיפה(נרמול-במקור, idempotent)אימות (DB חי, ROLLBACK)
2 רשומות עוברות → צפון 6→4, חיפה 0→2. קומפילציה OK.
Invariants
G1 (נרמול-במקור) · G2 (מקור-אמת יחיד לרשימת-המחוזות — follow-up: לאחד 3 רשימות-מחוזות מתפצלות: tools/service/metadata-extractor, כולל וריאנטים
ת"א/תל-אביב,ארצי/ארצית)🤖 Generated with Claude Code
Haifa (מחוז חיפה) and the North (מחוז הצפון) are separate Israeli planning districts, each with its own appeals committee. Two divergent bugs collapsed Haifa into צפון: - services/internal_decisions.py _VALID_DISTRICTS omitted "חיפה" (while the tools-layer VALID_DISTRICTS and db.py citation-abbrev map both include it — a G2 single-source-of-truth divergence) - _COURT_TO_DISTRICT mapped "חיפה" -> "צפון", so Haifa courts derived צפון Result: 2 Haifa committee decisions (1074-08-23, 8508-03-24) were mis-filed under צפון, and "חיפה" never appeared as a district. Changes: - add "חיפה" to service _VALID_DISTRICTS - _COURT_TO_DISTRICT: ("חיפה","צפון") -> ("חיפה","חיפה") - SCHEMA_V43: reclassify legacy internal rows whose court mentions חיפה from צפון -> חיפה (normalize at source, G1; idempotent) Verified against live DB (rollback txn): 2 rows move צפון(6)->צפון(4)+חיפה(2). Invariants: G1 (normalize at source) · G2 (single source of truth for the valid-district set — follow-up: consolidate the 3 divergent lists). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>