Support explicitly reference-selected read-only interface dependencies
This commit is contained in:
@@ -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 ?? [])
|
||||
|
||||
Reference in New Issue
Block a user