fix(ui): drop gold-set card from /api/chair/pending — data/ excluded from image
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) <noreply@anthropic.com>
This commit is contained in:
27
web/app.py
27
web/app.py
@@ -4897,8 +4897,6 @@ async def api_chair_pending():
|
|||||||
"""מרכז אישורים — דפנה: מאגד את כל השערים האנושיים (INV-G10) הממתינים להכרעת
|
"""מרכז אישורים — דפנה: מאגד את כל השערים האנושיים (INV-G10) הממתינים להכרעת
|
||||||
היו"ר במקום אחד, כדי שאף פריט לא יישכח. כל קטגוריה מחזירה ספירה + מדגם + קישור
|
היו"ר במקום אחד, כדי שאף פריט לא יישכח. כל קטגוריה מחזירה ספירה + מדגם + קישור
|
||||||
למקום הטיפול. כל ספירה היא שאילתת-מקור ישירה (לא נגזרת מטמונה)."""
|
למקום הטיפול. כל ספירה היא שאילתת-מקור ישירה (לא נגזרת מטמונה)."""
|
||||||
from pathlib import Path as _Path
|
|
||||||
|
|
||||||
pool = await db.get_pool()
|
pool = await db.get_pool()
|
||||||
categories: list[dict] = []
|
categories: list[dict] = []
|
||||||
async with pool.acquire() as conn:
|
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]],
|
"sample": [{"text": r["case_number"], "source": r["title"]} for r in qa_rows[:5]],
|
||||||
})
|
})
|
||||||
|
|
||||||
# 5) סקירת gold-set (איכות-אחזור, FU-5) — מבוסס-קובץ, best-effort
|
total_pending = sum(c["count"] for c in categories)
|
||||||
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")
|
|
||||||
return {
|
return {
|
||||||
"total_pending": total_pending,
|
"total_pending": total_pending,
|
||||||
"generated_at": datetime.now(timezone.utc).isoformat(),
|
"generated_at": datetime.now(timezone.utc).isoformat(),
|
||||||
|
|||||||
Reference in New Issue
Block a user