From 36b78ea404bf97d9f0643ed4e0c70c4e3b4361d4 Mon Sep 17 00:00:00 2001 From: Chaim Date: Thu, 7 May 2026 06:51:19 +0000 Subject: [PATCH] fix(precedent-library): queue listing must include internal_committee too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Earlier commit afcc481 opened request_metadata_extraction and request_halacha_extraction to all source kinds — but list_pending_extraction_requests still hard-filtered to external_upload. Result: stamping a queue request on an internal_committee row succeeded silently, but the worker (and the queue badge) never saw it. Even with the auto-wakeup added in c7132ba the CEO would wake, find 0 pending items, and exit. Drop the legacy filter so the queue listing matches the writer side. Coolify deploy required for the FastAPI container to pick this up. --- mcp-server/src/legal_mcp/services/db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mcp-server/src/legal_mcp/services/db.py b/mcp-server/src/legal_mcp/services/db.py index ab69227..630c3b0 100644 --- a/mcp-server/src/legal_mcp/services/db.py +++ b/mcp-server/src/legal_mcp/services/db.py @@ -2510,12 +2510,15 @@ async def list_pending_extraction_requests( else "halacha_extraction_requested_at" ) pool = await get_pool() + # Drop the legacy ``source_kind = 'external_upload'`` filter — without it + # internal_committee rows could be stamped (we opened that gate in + # request_metadata_extraction / request_halacha_extraction) but stayed + # invisible to the worker forever. rows = await pool.fetch( f"""SELECT id, case_number, case_name, court, date, practice_area, is_binding, {col} AS requested_at FROM case_law WHERE {col} IS NOT NULL - AND source_kind = 'external_upload' ORDER BY {col} ASC LIMIT $1""", limit,