From 676ae4532b9f7538072b2e836c1ac3bfe3083f69 Mon Sep 17 00:00:00 2001 From: Chaim Date: Fri, 19 Jun 2026 09:36:04 +0000 Subject: [PATCH] feat(halacha): --case-number filter for panel triage script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scope halacha_panel_approve.py to a single case's pending halachot so the 3-judge deliberation (#133/FU-2) can be captured on demand for one case (e.g. after a fresh extraction) instead of running the whole ~1.5k queue. Capture-only path unchanged; no auto-approval. Applied before --limit. Invariants: G1 (scope at source, not a parallel route) · G2 (reuses the existing panel/capture path) · INV-G10 (chair gate untouched — dry-run captures to halacha_panel_rounds only). Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/halacha_panel_approve.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/halacha_panel_approve.py b/scripts/halacha_panel_approve.py index 7d00cc6..f0be689 100644 --- a/scripts/halacha_panel_approve.py +++ b/scripts/halacha_panel_approve.py @@ -178,6 +178,10 @@ async def main(args: argparse.Namespace) -> int: print(f"judges available — deepseek:{bool(DEEPSEEK_KEY)} gemini:{bool(GEMINI_KEY)} " f"claude:local\n", flush=True) pending = await db.list_halachot(review_status="pending_review", limit=5000) + if args.case_number: + want = args.case_number.strip() + pending = [h for h in pending if (h.get("case_number") or "").strip() == want] + print(f"scoped to case {want}: {len(pending)} pending halachot\n", flush=True) if args.limit: pending = pending[: args.limit] @@ -369,6 +373,9 @@ if __name__ == "__main__": ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap.add_argument("--limit", type=int, default=0) + ap.add_argument("--case-number", default="", + help="scope the panel to a single case's pending halachot " + "(e.g. 8508-03-24); applied before --limit") ap.add_argument("--concurrency", type=int, default=6) ap.add_argument("--apply", action="store_true", help="write the agreed verdicts (reversible, CSV-backed); default dry-run")