Harden architecture hot paths

This commit is contained in:
gsxdsm
2026-04-12 15:13:27 -07:00
parent 7b78963a4c
commit a34ba41ad1
38 changed files with 1212 additions and 561 deletions

View File

@@ -0,0 +1,16 @@
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, {
resolveTask: async (dependencyId) => {
try {
return await store.getTask(dependencyId);
} catch {
return null;
}
},
});
}