Implement durable typed journals, subscriptions, and Reader document connections
Add checked native journal/subscription bindings, managed-reference retention, bounded history and backpressure, atomic delivery receipts, and fenced hosting. Preserve source publication prediction and replica reconciliation; subscription attachment, controls, and delivery remain authoritative in this initial version. Connect independent manual/Gutenberg document producers to Reader bookshelves through typed adapters. Add connection inspection, shared provider selection, authoring documentation, and restart/rejection/fan-out integration coverage. Verified compiler suite (287 passed, two existing skips), Nix runtime and PostgreSQL qualification, five example assemblies, headless Reader integration, Chromium Reader integration, resource pins, formatting, and lint. No pinned workspace runtime was deployed.
This commit is contained in:
@@ -603,3 +603,32 @@ test("prerequisites require explicit conformances and remain in the capability c
|
||||
applied.application!.arguments = [{ kind: "value", type: valueType.int64 }];
|
||||
assert.equal(compileWorkspaceRevision(forged).ok, false);
|
||||
});
|
||||
|
||||
test("edge read targets honor declared interface prerequisites without inferring unrelated conformances", () => {
|
||||
const interfaces = new Map();
|
||||
for (const text of [
|
||||
'interface Base id "base" revision "base@1" {}',
|
||||
'import interface Base; interface Detailed id "detailed" revision "detailed@1" requires Base {}',
|
||||
'import interface Base; interface Holder id "holder" revision "holder@1" {queryable relation item id "item" : optional-one interface Base {resolve id "item:resolve" execution snapshot targets [browser,server];}}',
|
||||
]) {
|
||||
const parsed = compileCapabilityResourceSource(text, { source, environment: { interfaces } });
|
||||
assert.ok(parsed.ok, JSON.stringify(parsed.diagnostics));
|
||||
if (parsed.resource.kind !== "interface") throw Error("interface expected");
|
||||
interfaces.set(parsed.resource.revision.displayName, parsed.resource.revision);
|
||||
}
|
||||
const assembly = `workspace W id "w" revision "w@1" commit "${source.commit}" {
|
||||
import interface Base;import interface Detailed;import interface Holder;
|
||||
atom Item id "item";atom Box id "box";
|
||||
conform Item as Base id "item-base" {} conform Item as Detailed id "item-detailed" {}
|
||||
conform Box as Holder id "box-holder" {
|
||||
private edge ItemEdge id "items" {atom Self projection item id "item" optional-one;interface Detailed projection holders id "holders" many;}
|
||||
bind item.resolve to edge ItemEdge.item.resolve;
|
||||
}
|
||||
}`;
|
||||
const valid = compileCapabilitySource(assembly, "workspace.qx", { interfaces });
|
||||
assert.ok(valid.ok, JSON.stringify(valid.diagnostics));
|
||||
const unrelated = new Map(interfaces);
|
||||
unrelated.set("Detailed", { ...interfaces.get("Detailed"), requiredInterfaces: [] });
|
||||
const invalid = compileCapabilitySource(assembly, "workspace.qx", { interfaces: unrelated });
|
||||
assert.equal(invalid.ok, false, "installed co-occurrence alone is not proof of a declared interface implication");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user