Extract 7 functions from 150-line spawnAgent goroutine: - detectFinalStatus: BLOCKED.md + exit code → status/question - trackFailureRate: fast-failure detection + backoff - startIssueTracking/stopIssueTracking: Forge stopwatch - broadcastStart/broadcastComplete: IPC + audit events - onAgentComplete: orchestrates all post-completion steps - agentOutputFile: log path helper spawnAgent is now: build command → start process → broadcast → monitor. All extracted functions are independently testable. Coverage: agentic 66.4% → 67.8% (+1.4pp) Co-Authored-By: Virgil <virgil@lethean.io> |
||
|---|---|---|
| .. | ||
| agentic | ||
| brain | ||
| lib | ||
| messages | ||
| monitor | ||
| setup | ||