feat(halacha): --case-number filter for panel triage script
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) <noreply@anthropic.com>
This commit is contained in:
@@ -178,6 +178,10 @@ async def main(args: argparse.Namespace) -> int:
|
|||||||
print(f"judges available — deepseek:{bool(DEEPSEEK_KEY)} gemini:{bool(GEMINI_KEY)} "
|
print(f"judges available — deepseek:{bool(DEEPSEEK_KEY)} gemini:{bool(GEMINI_KEY)} "
|
||||||
f"claude:local\n", flush=True)
|
f"claude:local\n", flush=True)
|
||||||
pending = await db.list_halachot(review_status="pending_review", limit=5000)
|
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:
|
if args.limit:
|
||||||
pending = pending[: args.limit]
|
pending = pending[: args.limit]
|
||||||
|
|
||||||
@@ -369,6 +373,9 @@ if __name__ == "__main__":
|
|||||||
ap = argparse.ArgumentParser(description=__doc__,
|
ap = argparse.ArgumentParser(description=__doc__,
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter)
|
formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
ap.add_argument("--limit", type=int, default=0)
|
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("--concurrency", type=int, default=6)
|
||||||
ap.add_argument("--apply", action="store_true",
|
ap.add_argument("--apply", action="store_true",
|
||||||
help="write the agreed verdicts (reversible, CSV-backed); default dry-run")
|
help="write the agreed verdicts (reversible, CSV-backed); default dry-run")
|
||||||
|
|||||||
Reference in New Issue
Block a user