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:
@@ -35,7 +35,7 @@ export {
|
||||
computeAccessState,
|
||||
isValidPermission,
|
||||
} from "./agent-permissions.js";
|
||||
export { AgentStore } from "./agent-store.js";
|
||||
export { AgentStore, DEFAULT_AGENT_HEARTBEAT_INTERVAL_MS } from "./agent-store.js";
|
||||
export type { AgentStoreEvents } from "./agent-store.js";
|
||||
export { ReflectionStore } from "./reflection-store.js";
|
||||
export type { ReflectionStoreEvents } from "./reflection-store.js";
|
||||
|
||||
Reference in New Issue
Block a user