Add checked workspace-interface query roots
Implement scoped interface extents across QX, generated bindings, SDK, Orch, Camino and browser queries. Preserve native projection, aggregation, pagination and watch invalidation without synthetic persisted objects. Validate exact query grants and scope freshness on execution and replay. Add local PostgreSQL, transport, browser and code-generation coverage. C1 implementation slice only: full-text indexes and Studio search adoption (C2/C3) remain tracked in the implementation handoff. No publication or deployment.
This commit is contained in:
@@ -27,6 +27,7 @@ export interface LinkedQuery {
|
||||
bindingDigest: string;
|
||||
fields: LinkedQueryField[];
|
||||
attachments: PersistentAttachment[];
|
||||
rootAtoms: AtomId[];
|
||||
}
|
||||
|
||||
/** Link every possible implementation, including atoms absent from today's data. */
|
||||
@@ -128,10 +129,17 @@ export function linkQueries(workspace: WorkspaceRevision): LinkedQuery[] {
|
||||
}
|
||||
}
|
||||
const storage = attachments.filter((entry) => needed.has(entry.id));
|
||||
const rootConformances = workspace.conformances.filter(
|
||||
(entry) => entry.interfaceRevisionId === declaration.root.interface,
|
||||
);
|
||||
const rootAtoms = [...new Set(rootConformances.map((entry) => entry.atomId))].sort();
|
||||
const bindingDigest = createHash("sha256")
|
||||
.update(
|
||||
canonicalJson({
|
||||
definition: checked.definitionDigest,
|
||||
rootConformances: rootConformances
|
||||
.map((entry) => ({ atomId: entry.atomId, id: entry.id, interfaceRevisionId: entry.interfaceRevisionId }))
|
||||
.sort((a, b) => canonicalJson(a).localeCompare(canonicalJson(b))),
|
||||
fields: [...fields].sort((a, b) => canonicalJson(a).localeCompare(canonicalJson(b))),
|
||||
storage: [...storage].sort((a, b) => a.id.localeCompare(b.id)),
|
||||
}),
|
||||
@@ -144,6 +152,7 @@ export function linkQueries(workspace: WorkspaceRevision): LinkedQuery[] {
|
||||
bindingDigest,
|
||||
fields,
|
||||
attachments: storage,
|
||||
rootAtoms,
|
||||
});
|
||||
}
|
||||
for (const entry of linked) entry.runtime = queryRuntimePlan(entry, workspace);
|
||||
|
||||
Reference in New Issue
Block a user