Evaluate coherent local queries over explicit replica scopes

This commit is contained in:
Timothy J. Aveni
2026-09-20 04:04:35 -07:00
parent 3f1976815f
commit c75888833b
5 changed files with 39 additions and 8 deletions
+9
View File
@@ -173,6 +173,15 @@ test("local queries cannot silently expand the replica relationship traversal",
assert.throws(() => compileExecutionPlan(workspace), /REPLICA_TRAVERSAL_MISSING/);
});
test("local relationships require complete source candidates even when a filter initially matches", async () => {
for (const selection of ["highlights(first: 10)", 'highlights(all: 1000, where: {color: {eq: "yellow"}})']) {
const workspace = await loadReaderWorkspace((name, text) =>
name === "queries/replica-inputs.graphql" ? text.replace("highlights(all: 1000)", selection) : text,
);
assert.throws(() => compileExecutionPlan(workspace), /REPLICA_RELATION_INCOMPLETE/);
}
});
test("closed generic applications retain distinct identities and codec shapes", async () => {
const { compileCapabilityResourceSource, compileCapabilitySource } =
await import("../src/capability-language/index.js");