Build and activate checked component packages through normal source authoring (WI-12)

This commit is contained in:
Timothy J. Aveni
2026-09-21 17:38:40 -07:00
parent e1ad15c620
commit 1e08ccd937
11 changed files with 336 additions and 571 deletions
+18
View File
@@ -84,3 +84,21 @@ test("explicit budgets can exceed defaults without exceeding wire bounds", () =>
assert.equal(result.resource.revision.queries![0]!.budgets.rows, 5000);
assert.equal(compile("4294967296").ok, false);
});
test("query identity follows public contracts, not source retention commits", async () => {
const document = async () => "query Rows {root {objects(first:10) {entries {node {range {start}}}}}}";
const before = await compileQuery(declaration, [iface], document);
const retained = {
...iface,
source: { ...iface.source, repository: "https://other.test/interfaces.git", commit: "b".repeat(40) },
};
assert.equal((await compileQuery(declaration, [retained], document)).definitionDigest, before.definitionDigest);
const changed = structuredClone(retained);
changed.members[0]!.operations[0]!.id = "changed:get" as (typeof changed.members)[0]["operations"][0]["id"];
assert.notEqual((await compileQuery(declaration, [changed], document)).definitionDigest, before.definitionDigest);
assert.notEqual(
(await compileQuery({ ...declaration, budgets: { ...declaration.budgets, rows: 17 } }, [retained], document))
.definitionDigest,
before.definitionDigest,
);
});