feat(seance): אחזור-הקשר מריצות-קודמות של issue לצמצום blind-heartbeats (#220) #407
Reference in New Issue
Block a user
Delete Branch "worktree-seance-predecessor"
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?
מה
פרוסה ראשונה של #220 (למידה מ-Gastown
gt seance): אחזור הקשר-מריצות-קודמות — כדי ש-wake טרי יקרא מה קודמיו על אותו issue הסיקו, במקום לגלות-מחדש בכל heartbeat (ה-generic blind heartbeat, project_comment_delivery_guarantee).איך
get_predecessor_context(issue_id, limit)(read-only) — מחזיר ריצות-heartbeat_runsשהסתיימו על ה-issue (newest-first) עם ה-summaryשכל heartbeat משאיר ב-result_json, ה-status, ה-session_id, ו-error_code. קשירת run→issue דרךwakeup_request_id → agent_wakeup_requests.payload->>'issueId';limitמוגבל 1..10.pc_get_predecessor_context(read-only, לא עטוף-טלמטריה).GET /api/operations/issues/{issue_id}/predecessor?limit=3.Invariants
בדיקות
web/tests/test_predecessor_context.py— 3 (fake-asyncpg: shaping+isoformat, clamp 1..10, empty). ✅אומת חי read-only על issue בן 11 ריצות (מקרה-לולאה קלאסי) → מוחזרות מסקנות-דיספוזיציה אמיתיות ("הלולאה נסגרה כראוי", "שורש האמת אותר וטופל") — בדיוק ה-re-work שהאחזור חוסך.
follow-up
חיווט-סוכנים: MCP tool שקורא ל-endpoint (G12 — לא נוגע ב-Paperclip) + HEARTBEAT (wake קורא predecessor בתחילת ריצה).
🤖 Generated with Claude Code
מוסיף get_predecessor_context(issue_id, limit) ב-paperclip_client — read-only, מחזיר ריצות-heartbeat שהסתיימו על אותו issue (newest-first) עם ה-summary שכל heartbeat משאיר ב-result_json, כך ש-wake טרי קורא מה קודמיו הסיקו במקום לגלות-מחדש (ה-generic blind heartbeat). קשירת run→issue דרך wakeup_request_id→payload.issueId; limit מוגבל 1..10. - Port: pc_get_predecessor_context (read-only, לא עטוף-טלמטריה). - endpoint: GET /api/operations/issues/{issue_id}/predecessor?limit=3. - 3 בדיקות (fake-asyncpg: shaping+isoformat, clamp, empty). אומת חי read-only על issue בן 11 ריצות → מוחזרות מסקנות-דיספוזיציה אמיתיות. Invariants: מקיים G12 (fetch מהמעטפת, המגע מהשער; אין REST/כלי-פלטפורמה בליבה), G2 (מקור-predecessor יחיד). follow-up: MCP tool + HEARTBEAT (wake קורא בתחילת ריצה). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>