fix(api_mark_final): remove ingest_final_version call from container
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 8s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 8s
ingest_final_version uses claude_session internally, which requires the Claude CLI binary (not present in the legal-ai FastAPI container). The call always failed with "Claude CLI not found" — caught by try/except but noisy. Replace with a static skipped status + comment pointing to the architectural rule. Run ingest_final_version manually via Claude Code / MCP from the local host when populating case_law is desired. The curator wakeup hook remains and works correctly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
17
web/app.py
17
web/app.py
@@ -2348,17 +2348,12 @@ async def api_mark_final(case_number: str, filename: str):
|
||||
if case_dir.exists():
|
||||
commit_and_push(case_dir, f"גרסה סופית: {final_name}")
|
||||
|
||||
# Best-effort: ingest final into internal corpus (case_law) — feeds
|
||||
# search_decisions and learning_loop. Non-fatal on failure.
|
||||
ingest_status: dict = {"status": "skipped"}
|
||||
try:
|
||||
ingest_result = await workflow_tools.ingest_final_version(
|
||||
case_number, file_path=str(final_path)
|
||||
)
|
||||
ingest_status = {"status": "ok", "result": (ingest_result or "")[:200]}
|
||||
except Exception as e:
|
||||
logger.warning("ingest_final_version failed for %s: %s", case_number, e)
|
||||
ingest_status = {"status": "error", "error": str(e)}
|
||||
# ingest_final_version into the case_law corpus is NOT called here:
|
||||
# it uses claude_session under the hood, which only works when invoked
|
||||
# from the local MCP server (Claude CLI present), not from this
|
||||
# FastAPI container. Run it manually via Claude Code / MCP when needed.
|
||||
# See: ~/.claude/projects/-home-chaim-legal-ai/memory/feedback_claude_session_local_only.md
|
||||
ingest_status: dict = {"status": "skipped", "reason": "container_no_claude_cli"}
|
||||
|
||||
# Best-effort: wake the Knowledge Curator (Hermes) to analyze the
|
||||
# signed final and propose updates to skills/lessons. Non-fatal on
|
||||
|
||||
Reference in New Issue
Block a user