feat(FN-2274): add engine-level stale-task safeguards in heartbeat execution

- HeartbeatMonitor.executeHeartbeat() now checks if resolved task is done/archived
  and exits before session creation with reason 'task_closed'
- When stale task came from persisted agent.taskId, clears the linkage to prevent
  repeated stale activations
- HeartbeatTriggerScheduler.watchAssignments() now skips assignment callback dispatch
  when assigned task is done/archived (when taskStore is available)
- Added comprehensive tests for stale-task activation guard behavior
This commit is contained in:
gsxdsm
2026-04-22 21:14:44 -07:00
parent 18503b2da5
commit 9dabb87c30
4 changed files with 63 additions and 5 deletions

View File

@@ -50,7 +50,11 @@ export default defineConfig({
},
server: {
proxy: {
"/api": "http://localhost:3000",
"/api": {
target: `http://localhost:${process.env.FUSION_API_PORT ?? "4040"}`,
changeOrigin: true,
ws: true,
},
},
},
});