Support explicitly reference-selected read-only interface dependencies

This commit is contained in:
Timothy J. Aveni
2026-09-20 22:15:15 -07:00
parent 266d2d98d0
commit c0669d2ed8
12 changed files with 1081 additions and 893 deletions
+17
View File
@@ -66,6 +66,23 @@ export function validateExecutionContracts(workspace: WorkspaceRevision): Capabi
: requirement.application.definitionId,
);
const selected = requirement.operations;
if (requirement.receiver === "input") {
if (
entry.execution?.kind !== "snapshot" ||
entry.execution.targets.length !== 1 ||
entry.execution.targets[0] !== "server" ||
!selected?.length
)
fail(
portPath,
"Reference-selected reads currently require a server-only snapshot and an explicit selection; local acquisition of dynamic inputs is not implemented",
);
for (const id of selected ?? []) {
const operation = contract && operations(id, contract);
if (operation?.execution?.kind !== "snapshot" || operation.scope === "class")
fail(portPath, "Reference-selected dependencies currently support object snapshot operations only");
}
}
if (selected && (!selected.length || new Set(selected).size !== selected.length))
fail(portPath, "Selected interface operations must be nonempty and distinct");
for (const id of selected ?? [])