feat(health): טקסונומיית-בריאות לסוכן — zombie/stalled/working/idle (#222) #406
Reference in New Issue
Block a user
Delete Branch "worktree-agent-health"
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?
מה
פרוסה ראשונה של #222 (למידה מ-Gastown
gt feed --problems): טקסונומיית-בריאות שממפה כל issue פתוח+משויך-סוכן למצב-בריאות חד — כדי שה-stranded-child / recovery-loop שאובחנו ידנית (reference_recovery_loop_stranded_child) יעלו אוטומטית. מרכיב ישירות על אירועי #219 (אותםreasonשל recovery).איך
web/agent_health.py— מסווג-טהורclassify_issue_health(has_live_run, recovery_wakeups, total_wakeups)(agent-agnostic, ללא-I/O, testable) +is_recovery_reason(סמני-loop מיומני-התקלות).working= run חי ·zombie= אין run חי + wakeup-recovery (assigned+active-כביכול אך כלום לא רץ) ·stalled= ננער חוזר בלי progress ·idle= המתנה בנונית.paperclip_client.get_agent_health()(מעטפת) — גוזר את 3 הפרימיטיבים מ-heartbeat_runs(finished_at IS NULLבחלון 30ד') +agent_wakeup_requests(total+recovery בחלון 2ש'), מסווג, מחזיר worst-first +counts. read-only, scoped ל-2 החברות.pc_get_agent_health(read-only — לא עטוף-טלמטריה, לפי הכלל). endpoint:GET /api/operations/agents/health.Invariants
בדיקות
web/tests/test_agent_health.py— 7 (מסווג-טהור לכל 4 המצבים +is_recovery_reason+ fetch fake-asyncpg שמסווג וממיין). ✅. אומת חי read-only מול Paperclip DB: 6 issues פתוחים→idleנכון, אפס zombie (מערכת בריאה כרגע).follow-up מגודר-עיצוב
צריכת-ה-UI ב-/operations (צ'יפ-בריאות/תצוגת-problems) חייבת קודם שער-Claude-Design (feedback_claude_design_gate) — לא בפרוסה זו.
🤖 Generated with Claude Code