feat(migration): enrich internal committee entries — fix case_number + metadata + halachot
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m32s

- precedent_metadata_extractor: add case_number_clean extraction field
- apply_to_record: overwrite_case_number param for one-time migration
- internal_decisions: enrich_migrated_entries() — runs metadata then queues halachot
- server: expose as internal_decision_enrich MCP tool

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 18:59:20 +00:00
parent c0f67ab841
commit 69d4827f33
3 changed files with 95 additions and 3 deletions

View File

@@ -624,6 +624,21 @@ async def internal_decision_migrate(
return _json.dumps(results, ensure_ascii=False, indent=2)
@mcp.tool()
async def internal_decision_enrich(
dry_run: bool = True,
) -> str:
"""העשרת החלטות שהומגרו (חד-פעמי): תיקון מספר ערר + שם + תאריך + תור להלכות.
dry_run=True — מציג כמה רשומות יטופלו ללא כתיבה.
dry_run=False — מריץ בפועל: metadata extraction (תיקון case_number/case_name/date) ואחר כך תור חילוץ הלכות.
"""
import json as _json
from legal_mcp.services import internal_decisions as int_svc
result = await int_svc.enrich_migrated_entries(dry_run=dry_run)
return _json.dumps(result, ensure_ascii=False, indent=2)
@mcp.tool()
async def record_chair_feedback(
case_number: str,