Implement Studio root and placement capabilities on the replica graph (WI-10)
This commit is contained in:
@@ -67,15 +67,10 @@ export function validateExecutionContracts(workspace: WorkspaceRevision): Capabi
|
||||
);
|
||||
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
|
||||
)
|
||||
if (!entry.execution || entry.execution.kind === "remote" || !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",
|
||||
"Reference-selected reads require a portable snapshot or transaction and an explicit selection",
|
||||
);
|
||||
for (const id of selected ?? []) {
|
||||
const operation = contract && operations(id, contract);
|
||||
@@ -108,6 +103,9 @@ export function validateExecutionContracts(workspace: WorkspaceRevision): Capabi
|
||||
fail(portPath, "Portable operations require a local query dependency");
|
||||
} else if (requirement.kind === "creation") {
|
||||
if (entry.execution.kind !== "transaction") fail(portPath, "Object creation requires transaction execution");
|
||||
} else if (requirement.kind === "reflection") {
|
||||
if (requirement.selectors.some((selector) => selector !== "presentations"))
|
||||
fail(portPath, "Only checked presentation metadata is portable");
|
||||
} else if (requirement.kind !== "interface")
|
||||
fail(portPath, `Portable execution does not support ${requirement.kind} dependencies`);
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,10 @@ const validatePackages = (
|
||||
!port.requirement.selectors.length ||
|
||||
new Set(port.requirement.selectors).size !== port.requirement.selectors.length ||
|
||||
port.requirement.selectors.some(
|
||||
(kind) => !["active", "atoms", "interfaces", "conformances", "queries", "indexes"].includes(kind),
|
||||
(kind) =>
|
||||
!["active", "atoms", "interfaces", "conformances", "queries", "indexes", "presentations"].includes(
|
||||
kind,
|
||||
),
|
||||
)
|
||||
)
|
||||
issue(issues, "invalid-dependency-binding", portPath, "Reflection requires distinct supported selectors");
|
||||
|
||||
Reference in New Issue
Block a user