feat(FN-4296): complete Step 5 — finalize sync wiring and verification fixes
Fusion-Task-Id: FN-4296 Fusion-Task-Lineage: 9d061861-547a-4905-8fdd-4b66dd7bff97
This commit is contained in:
@@ -484,10 +484,10 @@ describe("InProcessRuntime", () => {
|
||||
const moveData = { task: mockTask, from: "todo", to: "in-progress" };
|
||||
|
||||
const onCalls = (taskStore.on as ReturnType<typeof vi.fn>).mock.calls;
|
||||
const taskMovedHandler = onCalls.find((call: unknown[]) => call[0] === "task:moved");
|
||||
|
||||
if (taskMovedHandler) {
|
||||
(taskMovedHandler[1] as (data: { task: Task; from: string; to: string }) => void)(moveData);
|
||||
const taskMovedHandlers = onCalls.filter((call: unknown[]) => call[0] === "task:moved");
|
||||
|
||||
for (const handler of taskMovedHandlers) {
|
||||
(handler[1] as (data: { task: Task; from: string; to: string }) => void)(moveData);
|
||||
}
|
||||
|
||||
expect(taskMovedSpy).toHaveBeenCalledWith(moveData);
|
||||
|
||||
@@ -676,7 +676,7 @@ export class InProcessRuntime
|
||||
this.stuckTaskDetector.start();
|
||||
this.detachAgentLinkSync = attachAgentLinkSync({
|
||||
store: this.taskStore,
|
||||
agentStore: this.agentStore,
|
||||
agentStore: this.agentStore!,
|
||||
hasActiveAgentExecution: (agentId: string) => this.heartbeatMonitor?.getTrackedAgents().includes(agentId) ?? false,
|
||||
logger: runtimeLog,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user