feat(FN-4249): complete Step 3 — add running-agent mismatch self-healing

Fusion-Task-Id: FN-4249
Fusion-Task-Lineage: e0052fae-38e1-4d66-8240-43d26f5790bb
This commit is contained in:
Fusion
2026-05-12 22:14:58 -07:00
committed by gsxdsm
parent b1ce2272d2
commit 8f17ab33cd
5 changed files with 100 additions and 1 deletions

View File

@@ -863,6 +863,10 @@ export class HeartbeatMonitor {
* Called on monitor start AND periodically from the polling loop to keep
* the system self-healing across versions. Best-effort — failures are
* logged but do not block the caller.
*
* Complements SelfHealingManager.recoverAgentsRunningOnInactiveTasks():
* heartbeat reconciliation handles stale/no-run conditions, while self-healing
* handles task-column mismatches (for example running agents linked to todo tasks).
*/
private async reconcileOrphanedRunningAgents(): Promise<void> {
try {