Files
fusion/packages/engine/src/task-completion.ts
Fusion ab66e5b60a feat(FN-4091): fix stale blocker in WorkflowResultsTab
The branch delivers a fix for stale blockers in the WorkflowResultsTab component, with the primary logic change in the component file and comprehensive test coverage added in the companion test suite.

Fusion-Task-Id: FN-4091
2026-05-12 17:24:44 -07:00

19 lines
590 B
TypeScript

import { getTaskCompletionBlocker, type Task, type TaskStore } from "@fusion/core";
export async function getTaskCompletionBlockerForStore(
store: Pick<TaskStore, "getTask">,
task: Task,
): Promise<string | undefined> {
return getTaskCompletionBlocker(task, {
// FN-4091: return full task state from the store so completion gating can
// ignore stale blockedBy markers when the blocker is missing or terminal.
resolveTask: async (dependencyId) => {
try {
return await store.getTask(dependencyId);
} catch {
return null;
}
},
});
}