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
+10
View File
@@ -1,3 +1,4 @@
import { isStorableType } from "./generics.js";
import { validateInitialization } from "./initialization.js";
import { validateExecutionContracts } from "./execution.js";
import { resolveForwardedBinding, type ConcreteBinding } from "./forwarding.js";
@@ -244,6 +245,15 @@ const validateValueType = (
requireText(issues, type.descriptorId, `${path}.descriptorId`, "Message descriptor identity");
return;
case "change":
if (!isStorableType(type.value))
issue(
issues,
"invalid-value-type",
path,
"change<T> requires a storable materialized type, not references or nested changes",
);
validateValueType(issues, type.value, path + ".value", indexes);
return;
case "optional":
case "list":
validateValueType(issues, type.value, `${path}.value`, indexes);