fix(#78): trigger extraction wakeup on committee-decision upload + surface silent failures #39
Reference in New Issue
Block a user
Delete Branch "fix/78-precedent-extraction-wakeup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
הבעיה (שורש #78)
נתיב
/api/internal-decisions/upload— שבו ה-UI משתמש להעלאת החלטות ועדת-ערר — לא קרא ל-pc_wake_for_precedent_extraction, אז ה-CEO מעולם לא הוער והחילוץ נתקע ב-halacha_extraction_status='pending'לנצח. זה השורש מאחורי 8027-25 התקוע. שני נתיבי ההעלאה האחרים (precedent_library, missing-precedent) כן מעירים — רק זה היה חסר.בנוסף:
pc_wake_for_precedent_extractionמחזיר{ok:False}בלי לזרוק כש-wakeup מדולג/נכשל → השגיאה נבלעה בשקט והתיק נשאר pending בלי שום אינדיקציה.התיקון
extraction_queued.נדחה
מנקז מתוזמן (scheduled
precedent_process_pending) — ה-wakeup החסר היה הכשל בפועל; הרצה ידנית נשארת מסלול ההתאוששות.🤖 Generated with Claude Code
The /api/internal-decisions/upload path (used by the UI for ועדת-ערר decisions) never called pc_wake_for_precedent_extraction, so committee decisions were stuck at halacha_extraction_status='pending' forever — the CEO was never woken to drain the queue. Root cause behind 8027-25's stuck extraction. The other two upload paths (precedent_library, missing-precedent) already wake the CEO; this one was missing it. - internal-decisions upload: add the wakeup, routing the company by case number prefix (1xxx→רישוי, 8xxx→היטל, 9xxx→פיצויים) when practice_area is empty (else an 8xxx case wrongly routes to the licensing CEO). - all three call sites: the wake helper returns {ok:False} WITHOUT raising on a skipped/failed wakeup; that was silently dropped. Now logged at WARNING with the reason, and the upload progress carries extraction_queued. Fallback drainer (scheduled precedent_process_pending) deferred — the missing wakeup was the actual failure; manual precedent_process_pending remains the recovery path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>