feat(FN-3507): block dispatch when project lacks node mapping

Adds validation to block task dispatch when no project-node mapping exists (FN-3507), including a read helper in CentralCore and a new `node-dispatch-validation` module integrated into the scheduler and in-process runtime, with test coverage across routing and validation scenarios.

Fusion-Task-Id: FN-3507
This commit is contained in:
Fusion
2026-05-07 21:23:26 -07:00
committed by gsxdsm
parent f5e78d77d6
commit a1354685d0
9 changed files with 261 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ import { MissionAutopilot } from "../mission-autopilot.js";
import { MissionExecutionLoop } from "../mission-execution-loop.js";
import { TriageProcessor } from "../triage.js";
import { EphemeralWorkerManager } from "../ephemeral-worker-manager.js";
import { validateProjectNodeMapping } from "../node-dispatch-validation.js";
/**
* InProcessRuntime runs a project within the main process.
@@ -300,6 +301,10 @@ export class InProcessRuntime
runtimeLog.log(`Scheduled task ${task.id}`);
},
onBlocked: () => {},
validateNodeDispatch: async (nodeId) => {
const mappedPath = await this.centralCore.getProjectNodePath(this.config.projectId, nodeId);
return validateProjectNodeMapping({ nodeId, mappedPath });
},
});