chore(migration): renumber 11 cases to canonical NNNN-MM-YY #221

Merged
chaim merged 1 commits from worktree-case-renumber-tool into main 2026-06-12 06:24:56 +00:00
Owner

מיגרציה חד-פעמית (בוצעה כבר 2026-06-12 על הייצור; ה-PR מתעד את הכלי).

מה נעשה

הוספת ספרות-חודש ל-11 מספרי-תיקים + תיקון-סידורי 1046-26→1024-02-26:

clean (7):   8137-24→8137-11-24 · 8065-25→8065-05-25 · 8174-24→8174-12-24
             1027-26→1027-04-26 · 1195-25→1195-12-25 · 1033-25→1033-02-25 · 1046-26→1024-02-26
archive (4): 1130-25→1130-08-25 · 1194-25→1194-12-25 · 1200-25→1200-12-25 · 8070-25→8070-05-25

למה כלי ולא עריכה-ב-UI

כל קשרי-ה-DB על cases.id (UUID) → לא נשברים. מה שכן מוטבע כטקסט וטופל אטומית per-case (גיבוי ל-data/audit/ + אימות):

  • cases.case_number + כל עמודה עם cases/{old}/file_path וגם image_thumbnail_path (מפתח-אחסון בלי /data → needle בלי-סלאש)
  • תיקיית-דיסק + case.json
  • מפתחי-MinIO ב-3 buckets — legal-immutable = WORM, copy-only (הישן נשאר נעול 7y)
  • Gitea repo rename + remote מקומי + description
  • שם-פרויקט Paperclip

עקביות חוצת-קורפוס (4 הארכיב)

לתיקים שסופי שלהם הוטמע — המספר הקנוני הופץ לשדות-המזהה (case_law.case_number, style_corpus/style_exemplars.decision_number ×39, case_precedents.citation, digests.underlying_citation) בלבד. תוכן/full_text/OCR נשאר כרשומה היסטורית.

אימות

0 אזכורים-תלויים בכל 11; מסמכים/thumbnails/טיוטות/Gitea/Paperclip נפתרים תחת המספרים החדשים; case_law הופץ לכל 4.

Invariants

G1 (נרמול-במקור), G2 (אין מסלול-מקביל — pool+סמנטיקת-אחסון של האפליקציה), G12 (Paperclip רק דרך המשטח המוצהר).

🤖 Generated with Claude Code

מיגרציה חד-פעמית (**בוצעה כבר** 2026-06-12 על הייצור; ה-PR מתעד את הכלי). ## מה נעשה הוספת ספרות-חודש ל-11 מספרי-תיקים + תיקון-סידורי `1046-26→1024-02-26`: ``` clean (7): 8137-24→8137-11-24 · 8065-25→8065-05-25 · 8174-24→8174-12-24 1027-26→1027-04-26 · 1195-25→1195-12-25 · 1033-25→1033-02-25 · 1046-26→1024-02-26 archive (4): 1130-25→1130-08-25 · 1194-25→1194-12-25 · 1200-25→1200-12-25 · 8070-25→8070-05-25 ``` ## למה כלי ולא עריכה-ב-UI כל קשרי-ה-DB על `cases.id` (UUID) → לא נשברים. מה ש**כן** מוטבע כטקסט וטופל אטומית per-case (גיבוי ל-`data/audit/` + אימות): - `cases.case_number` + כל עמודה עם `cases/{old}/` — `file_path` **וגם** `image_thumbnail_path` (מפתח-אחסון בלי `/data` → needle בלי-סלאש) - תיקיית-דיסק + `case.json` - מפתחי-MinIO ב-3 buckets — `legal-immutable` = WORM, **copy-only** (הישן נשאר נעול 7y) - Gitea repo rename + remote מקומי + description - שם-פרויקט Paperclip ## עקביות חוצת-קורפוס (4 הארכיב) לתיקים שסופי שלהם הוטמע — המספר הקנוני הופץ לשדות-המזהה (`case_law.case_number`, `style_corpus`/`style_exemplars.decision_number` ×39, `case_precedents.citation`, `digests.underlying_citation`) **בלבד**. תוכן/`full_text`/OCR נשאר כרשומה היסטורית. ## אימות 0 אזכורים-תלויים בכל 11; מסמכים/thumbnails/טיוטות/Gitea/Paperclip נפתרים תחת המספרים החדשים; `case_law` הופץ לכל 4. ## Invariants G1 (נרמול-במקור), G2 (אין מסלול-מקביל — pool+סמנטיקת-אחסון של האפליקציה), G12 (Paperclip רק דרך המשטח המוצהר). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chaim added 1 commit 2026-06-12 06:24:47 +00:00
chore(migration): renumber 11 cases to canonical NNNN-MM-YY
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 7s
183156646c
One-time host migration (executed 2026-06-12): adds the missing 2-digit month
to 11 case numbers (and corrects 1046-26 → 1024-02-26, a wrong serial).

All legal-ai FKs are on cases.id (UUID) → untouched. The script atomically
migrates, per case, everything that embeds the number as TEXT:
  · cases.case_number + every column containing 'cases/{old}/' (file_path AND
    image_thumbnail_path — the latter is a DATA_DIR-relative storage key with
    no '/data' prefix, hence the slash-less needle)
  · disk dir + case.json
  · MinIO keys across 3 buckets (legal-immutable = WORM, copy-only)
  · Gitea repo rename + local .git remote + description
  · Paperclip project name
For the 4 archived cases whose final was ingested, the canonical number is
propagated to the precedent + style corpora identifier fields (case_law,
style_corpus, style_exemplars, citations) per chair decision — document
content / full_text / OCR text is left as the historical record.

Verified: 0 stale identifier/path refs across all 11; documents, thumbnails,
drafts, Gitea, Paperclip all resolve under the new numbers. Per-case backups
in data/audit/renumber-*.json.

Invariants: G1 (normalise at source — single rename op, not read-time patch),
G2 (no parallel path — reuses the app's DB pool + storage semantics),
G12 (Paperclip touched only via its declared surface).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chaim merged commit 1470841e26 into main 2026-06-12 06:24:56 +00:00
chaim deleted branch worktree-case-renumber-tool 2026-06-12 06:24:56 +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#221