feat(ql3): establish 3.0 incubation baseline

This commit is contained in:
whyour
2026-08-12 00:25:26 +08:00
parent 4bf92dcfeb
commit c699c32461
2817 changed files with 779642 additions and 653 deletions
+23
View File
@@ -0,0 +1,23 @@
import type { ExecutionSpec } from './execution';
import { cloneExecutionSpec } from './executionSpec';
import type { RunDispatchCandidate } from './runDispatchCandidate';
/** Normalizes a trusted plan and binds it to one persisted candidate identity. */
export function executionSpecForRunDispatchCandidate(
candidate: RunDispatchCandidate,
value: ExecutionSpec,
): ExecutionSpec {
const executionSpec = cloneExecutionSpec(value);
if (
executionSpec.runId !== candidate.runId ||
executionSpec.attemptId !== candidate.attemptId ||
executionSpec.projectId !== candidate.projectId ||
executionSpec.taskId !== candidate.taskId ||
executionSpec.taskRevision !== candidate.taskRevision
) {
throw new TypeError(
'ExecutionSpec identity does not match its dispatch candidate',
);
}
return executionSpec;
}