Support captured CRDT changes in compound transaction contracts

This commit is contained in:
Timothy J. Aveni
2026-09-20 23:07:09 -07:00
parent 33f674321b
commit 2056c1e352
10 changed files with 171 additions and 16 deletions
+6 -6
View File
@@ -53,16 +53,16 @@ test("edit cannot target a register, mismatched profile, or ordinary replacement
);
}
});
test("authored prepared change transport values fail explicitly until their runtime is implemented", () => {
test("authored prepared changes retain their materialized type as transport values", () => {
const result = compileCapabilityResourceSource(
'package P id "p" revision "p@1" { function applyChange id "apply" : change<string> -> unit; }',
{ source },
);
assert.equal(result.ok, false);
assert.ok(
result.diagnostics.some((d) => d.code === "unsupported-prepared-change"),
JSON.stringify(result.diagnostics),
);
assert.ok(result.ok && result.resource.kind === "package", JSON.stringify(result.diagnostics));
assert.deepEqual(result.resource.revision.exports[0]!.inputType, {
kind: "change",
value: { kind: "scalar", name: "string" },
});
});
test("generic edit retains its materialized type through specialization", () => {