feat(FN-5486): merge fusion/fn-5486

This commit is contained in:
gsxdsm
2026-05-22 23:42:44 -07:00
parent 7345ab85d0
commit d3ad0641c4
4 changed files with 100 additions and 33 deletions

View File

@@ -3422,9 +3422,6 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
const task = await this.createTaskWithDistributedReservation(input, {
createTaskWithId: async (taskId) => {
if (input.dependencies?.includes(taskId)) {
throw new Error(`Task ${taskId} cannot depend on itself`);
}
await this.assertNoDependencyCycle(taskId, input.dependencies ?? [], "createTask");
return this._createTaskInternal(
input,
@@ -3525,10 +3522,6 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
throw new Error("taskId is required");
}
if (input.dependencies?.includes(id)) {
throw new Error(`Task ${id} cannot depend on itself`);
}
await this.assertNoDependencyCycle(id, input.dependencies ?? [], "createTaskWithReservedId");
this.assertTaskIdAvailable(id);
@@ -5090,10 +5083,6 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
runContext?: RunMutationContext,
): Promise<Task> {
return this.withTaskLock(id, async () => {
// Validate that task doesn't depend on itself
if (updates.dependencies?.includes(id)) {
throw new Error(`Task ${id} cannot depend on itself`);
}
if (updates.dependencies !== undefined) {
await this.assertNoDependencyCycle(
id,