Make local graph execution optional across composed packages

This commit is contained in:
Timothy J. Aveni
2026-09-28 21:05:42 -07:00
parent 1e72713ae2
commit e9c15fe40f
87 changed files with 3703 additions and 3400 deletions
+7 -6
View File
@@ -12,19 +12,20 @@ const source = { repository: "https://example.test/keyed.git", commit: "a".repea
const iface = compileCapabilityResourceSource(
`interface Index<object Item> id "index" revision "index@1" {
queryable relation entries id "entries" : many object Item keyed "string" {
resolve id "resolve" execution snapshot targets [browser,server];
connect id "connect" execution transaction targets [browser,server];
resolve id "resolve" execution snapshot;
connect id "connect" execution transaction;
}
operation add id "add" : record {mapKey:string;target:ref<Item>;} -> unit {
call id "add-call" execution transaction targets [browser,server];
call id "add-call" execution transaction;
}
}`,
{ source },
);
assert.ok(iface.ok && iface.resource.kind === "interface", JSON.stringify(iface.diagnostics));
const pkg = compileCapabilityResourceSource(
`package Runtime id "runtime" revision "runtime@1" {
operation add<object Item> id "add" : record {mapKey:string;target:ref<Item>;} -> unit mode call execution transaction targets [browser,server] receiver any requires {
`symbol JavaScript id "target:org.quixos.execution.javascript@1";
package Runtime id "runtime" revision "runtime@1" {
operation add<object Item> id "add" : record {mapKey:string;target:ref<Item>;} -> unit mode call execution transaction targets [JavaScript,server] receiver any requires {
edge entries id "entries" : many object Item keyed "string" [resolve,connect];
};
}`,
@@ -61,7 +62,7 @@ test("generic keyed relationships and portable ports have matching checked shape
const plan = compileExecutionPlan(result.workspace);
assert.doesNotThrow(() => compileKernelProgram(plan));
const bindings = generatePortableTypeScriptBindings(plan.definition.bindingSchema, "runtime@1", {
target: "browser",
target: "target:org.quixos.execution.javascript@1",
});
assert.match(bindings, /readonly "mapKey": string/);
assert.match(bindings, /readonly "connect": \(input: \{ readonly "mapKey": string;/);