From c231782ee85a9b9c0602c08c16f4cdff51008b4d Mon Sep 17 00:00:00 2001 From: Chaim Date: Sun, 31 May 2026 15:41:00 +0000 Subject: [PATCH] =?UTF-8?q?fix(ui):=20drop=20gold-set=20card=20from=20/api?= =?UTF-8?q?/chair/pending=20=E2=80=94=20data/=20excluded=20from=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gold-set card read data/eval/gold-set.jsonl, but .dockerignore excludes data/ from the build context, so the file is never in the container and the card silently never rendered. Baking eval data into the image is the wrong layering (data/ is runtime volumes). The gold-set review is a one-time task, not a recurring chair queue, so it doesn't belong on the live board — it's tracked via task #63 and reviewed directly with the chair. The board now returns the 4 robust DB-backed gates (halachot, missing precedents, feedback, qa_failed). Removes the best-effort file read + its unused Path import. Co-Authored-By: Claude Opus 4.8 (1M context) --- web/app.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/web/app.py b/web/app.py index 9d44865..66d5896 100644 --- a/web/app.py +++ b/web/app.py @@ -4897,8 +4897,6 @@ async def api_chair_pending(): """מרכז אישורים — דפנה: מאגד את כל השערים האנושיים (INV-G10) הממתינים להכרעת היו"ר במקום אחד, כדי שאף פריט לא יישכח. כל קטגוריה מחזירה ספירה + מדגם + קישור למקום הטיפול. כל ספירה היא שאילתת-מקור ישירה (לא נגזרת מטמונה).""" - from pathlib import Path as _Path - pool = await db.get_pool() categories: list[dict] = [] async with pool.acquire() as conn: @@ -4956,30 +4954,7 @@ async def api_chair_pending(): "sample": [{"text": r["case_number"], "source": r["title"]} for r in qa_rows[:5]], }) - # 5) סקירת gold-set (איכות-אחזור, FU-5) — מבוסס-קובץ, best-effort - try: - gp = _Path(__file__).resolve().parent.parent / "data" / "eval" / "gold-set.jsonl" - if gp.exists(): - total = chair = 0 - for line in gp.read_text(encoding="utf-8").splitlines(): - line = line.strip() - if not line: - continue - total += 1 - if '"source": "chair"' in line or '"source":"chair"' in line: - chair += 1 - unreviewed = total - chair - categories.append({ - "key": "gold_set", "label": "סקירת gold-set (איכות אחזור)", - "description": "שאילתות-מבחן לאיכות-האחזור — לאשר/לתקן אילו תוצאות נכונות.", - "count": unreviewed, "severity": "low" if unreviewed else "ok", - "href": None, "extra": {"total": total, "reviewed": chair}, - "sample": [], - }) - except Exception: - logger.exception("chair/pending: gold-set read failed (skipped)") - - total_pending = sum(c["count"] for c in categories if c["key"] != "gold_set") + total_pending = sum(c["count"] for c in categories) return { "total_pending": total_pending, "generated_at": datetime.now(timezone.utc).isoformat(),