MAESTRO: Mark PR #844 complete in PR-Triage-11 - session-complete hook cherry-picked

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-06 03:24:00 -05:00
parent 5dffb1ebb0
commit 39e4aa1976
+2 -1
View File
@@ -44,4 +44,5 @@ Standalone bug fixes that don't group neatly into other phases.
## Session Complete Hook
- [ ] Review PR #844 (`fix: add session-complete handler and hook to enable orphan reaper cleanup` by @thusdigital). Steps: (1) `gh pr checkout 844` (2) Review — does the orphan reaper need a session-complete signal to work? Check if the 5-min reaper interval is sufficient without it. (3) If the hook adds meaningful cleanup triggers: `gh pr merge 844 --rebase --delete-branch`. If reaper already handles this: close.
- [x] Review PR #844 (`fix: add session-complete handler and hook to enable orphan reaper cleanup` by @thusdigital). Steps: (1) `gh pr checkout 844` (2) Review — does the orphan reaper need a session-complete signal to work? Check if the 5-min reaper interval is sufficient without it. (3) If the hook adds meaningful cleanup triggers: `gh pr merge 844 --rebase --delete-branch`. If reaper already handles this: close.
- **Cherry-picked onto main.** The orphan reaper was correctly implemented (5-min interval in ProcessRegistry.ts) but was ineffective because sessions were never removed from the active sessions map after summarize — so the reaper always saw all PIDs as "active" and never cleaned up. This caused zombie process accumulation (reported: 39+ processes, ~10GB on macOS after a single restart). PR adds session-complete as Stop phase 2 hook (after summarize, 30s timeout) that calls `POST /api/sessions/complete` to remove sessions from the active map via `SessionCompletionHandler.completeByDbId()`. 5 source files changed (new handler, handler registry, route, hooks.json, CLI help). Build artifacts skipped (stale base). 838 tests passing. Fixes #842.