Restore generic Studio object navigation and discovery
This commit is contained in:
@@ -381,6 +381,27 @@ export function compileExecutionPlan(input: WorkspaceRevision): ExecutionPlan {
|
||||
query.id,
|
||||
"Local and replica queries must use the same root contract",
|
||||
);
|
||||
if (localRoot.kind === "workspace-interface") {
|
||||
const sourceWindows = source.query.checked.selection
|
||||
.flatMap((root) => root.selection)
|
||||
.filter((s) => s.name === "objects");
|
||||
for (const selection of query.query.checked.selection
|
||||
.flatMap((root) => root.selection)
|
||||
.filter((s) => s.name === "objects")) {
|
||||
if (
|
||||
!sourceWindows.some(
|
||||
(window) =>
|
||||
canonicalJson({ arguments: window.arguments, conditions: window.conditions }) ===
|
||||
canonicalJson({ arguments: selection.arguments, conditions: selection.conditions }),
|
||||
)
|
||||
)
|
||||
throw new ExecutionPlanError(
|
||||
"REPLICA_WINDOW_MISMATCH",
|
||||
query.id,
|
||||
"Local objects must observe the identical confirmed source window; use availableObjects for a local candidate view",
|
||||
);
|
||||
}
|
||||
}
|
||||
const traversals = (linked: LinkedQuery) => {
|
||||
const paths = new Map<string, { complete: boolean; requiresComplete: boolean; windows: Set<string> }>();
|
||||
const entry = (key: string) => {
|
||||
|
||||
Reference in New Issue
Block a user