feat(seance): אחזור-הקשר מריצות-קודמות של issue לצמצום blind-heartbeats (#220) #407

Merged
chaim merged 1 commits from worktree-seance-predecessor into main 2026-07-07 03:16:50 +00:00
Owner

מה

פרוסה ראשונה של #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.

  • Port: pc_get_predecessor_context (read-only, לא עטוף-טלמטריה).
  • endpoint: GET /api/operations/issues/{issue_id}/predecessor?limit=3.

Invariants

  • G12 — ה-fetch במעטפת, המגע מהשער; אין REST/כלי-פלטפורמה בליבה.
  • G2 — מקור-predecessor יחיד.

בדיקות

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

## מה פרוסה ראשונה של **#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. - **Port**: `pc_get_predecessor_context` (read-only, לא עטוף-טלמטריה). - **endpoint**: `GET /api/operations/issues/{issue_id}/predecessor?limit=3`. ## Invariants - **G12** — ה-fetch במעטפת, המגע מהשער; אין REST/כלי-פלטפורמה בליבה. - **G2** — מקור-predecessor יחיד. ## בדיקות `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](https://claude.com/claude-code)
chaim added 1 commit 2026-07-07 03:16:21 +00:00
feat(seance): אחזור-הקשר מריצות-קודמות של issue לצמצום blind-heartbeats (#220)
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 3s
Lint — undefined names / undefined-names (pull_request) Successful in 10s
e203474548
מוסיף 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>
chaim merged commit dede33cdff into main 2026-07-07 03:16:50 +00:00
chaim deleted branch worktree-seance-predecessor 2026-07-07 03:16:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ezer-mishpati/legal-ai#407