refactor(ingest): drop obsolete queue_halachot flag + dead imports (FU-1 review)
pipeline always queues both extraction kinds (INV-ING3); remove the now-meaningless queue_halachot param from ingest_internal_decision and migrate_from_style_corpus. Also trim chunker/extractor/rerank from the precedent_library module-top import (chunking/extraction moved to ingest.py). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -111,7 +111,6 @@ async def ingest_internal_decision(
|
||||
file_path: str | Path | None = None,
|
||||
text: str | None = None,
|
||||
document_id: UUID | None = None,
|
||||
queue_halachot: bool = True, # retained for signature compat; pipeline always queues
|
||||
proceeding_type: str = "",
|
||||
) -> dict:
|
||||
"""Ingest one appeals-committee decision. Thin wrapper over the canonical pipeline."""
|
||||
@@ -130,7 +129,7 @@ async def ingest_internal_decision(
|
||||
"chunks": out["chunks"], "halachot_pending": True}
|
||||
|
||||
|
||||
async def migrate_from_style_corpus(dry_run: bool = False, queue_halachot: bool = True) -> dict:
|
||||
async def migrate_from_style_corpus(dry_run: bool = False) -> dict:
|
||||
"""Re-index all style_corpus entries as searchable internal committee decisions.
|
||||
|
||||
Does NOT delete style_corpus rows — they remain for style analysis.
|
||||
@@ -188,7 +187,6 @@ async def migrate_from_style_corpus(dry_run: bool = False, queue_halachot: bool
|
||||
appeal_subtype=subtype,
|
||||
subject_tags=subject_tags,
|
||||
text=row["full_text"],
|
||||
queue_halachot=queue_halachot,
|
||||
)
|
||||
results["ingested"] += 1
|
||||
logger.info("Migrated style_corpus entry: %s", case_number)
|
||||
|
||||
@@ -20,7 +20,7 @@ from typing import Awaitable, Callable
|
||||
from uuid import UUID
|
||||
|
||||
from legal_mcp import config
|
||||
from legal_mcp.services import chunker, db, embeddings, extractor, hybrid_search, ingest, rerank # noqa: F401
|
||||
from legal_mcp.services import db, embeddings, hybrid_search, ingest # noqa: F401
|
||||
|
||||
# Note: halacha_extractor and precedent_metadata_extractor are NOT imported
|
||||
# at module load. They are imported lazily inside the dedicated re-extract
|
||||
|
||||
Reference in New Issue
Block a user