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 695cb0bca5
commit 11bf7084e1
9 changed files with 261 additions and 1 deletions

View File

@@ -1769,6 +1769,16 @@ export class CentralCore extends EventEmitter<CentralCoreEvents> {
return row ? this.rowToProjectNodePathMapping(row) : undefined;
}
async getProjectNodePath(projectId: string, nodeId: string): Promise<string | undefined> {
this.ensureInitialized();
const row = this.db!
.prepare("SELECT path FROM projectNodePathMappings WHERE projectId = ? AND nodeId = ?")
.get(projectId, nodeId) as { path: string } | undefined;
return row?.path;
}
async listProjectNodePathMappings(filters?: {
projectId?: string;
nodeId?: string;