Restore generic Studio object navigation and discovery

This commit is contained in:
Timothy J. Aveni
2026-09-22 19:05:13 -07:00
parent 1b296daf42
commit 595eda834f
4 changed files with 42 additions and 6 deletions
+21
View File
@@ -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) => {