docs: record the five Phase 8 prerequisites, and report contributions
Bring the living documentation in line with what the five passes actually shipped, and correct the claims they superseded rather than leaving them to mislead: the module UI context is six members, not five; module styling is compiled CSS, not inline objects only; the strict manifest is version 7. Also close a silent failure the new contribution mechanism introduces. A contribution whose target capability nobody provides — or whose provider moved outside its declared range — is not published, and the manifest is valid and the artifact exists, so an operator sees a screen that renders nothing with no error anywhere. `pnpm modules:validate` now lists each declared contribution with its capability and range and says whether a compatible provider is installed, and Doctor's discovery check reports the same per module. Both derive from the publication registry the API serves from, so neither can disagree with what a running platform would actually publish. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ca3f37d5f9
commit
20d5128bad
@@ -1472,3 +1472,91 @@ describe("Ekklesia Doctor — object storage", () => {
|
||||
expect(check(report, "object-storage.bindings").status).toBe("skipped");
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* A browser contribution whose target capability nobody provides is otherwise silent: the manifest
|
||||
* is valid, the artifact exists, and the screen renders nothing with no error anywhere (ADR 0041).
|
||||
* Doctor names it.
|
||||
*/
|
||||
describe("Doctor reports declared browser contributions", () => {
|
||||
function contributing(
|
||||
id: string,
|
||||
contribution: { capability: string; capabilityRange: string },
|
||||
): DiscoveredModule {
|
||||
const base = discoveredModule(id);
|
||||
return {
|
||||
...base,
|
||||
contributions: [
|
||||
{
|
||||
artifactPath: `/unpublished/${id}/contributions/slide.js`,
|
||||
capability: contribution.capability,
|
||||
capabilityRange: contribution.capabilityRange,
|
||||
id: `${id}.slide`,
|
||||
version: "1.0.0",
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
function providing(id: string, capability: { id: string; version: string }): DiscoveredModule {
|
||||
const base = discoveredModule(id);
|
||||
return {
|
||||
...base,
|
||||
manifest: { ...base.manifest, capabilities: [capability] } as DiscoveredModule["manifest"],
|
||||
};
|
||||
}
|
||||
|
||||
async function detailsFor(modules: readonly DiscoveredModule[]): Promise<readonly string[]> {
|
||||
const report = await diagnoseEkklesia(
|
||||
options(),
|
||||
dependencies({
|
||||
discoverModules: vi.fn(async () => Object.freeze([...modules])),
|
||||
discoverSchemas: vi.fn(async () => schemaAggregate(modules)),
|
||||
}),
|
||||
);
|
||||
return check(report, "modules.discovery").details;
|
||||
}
|
||||
|
||||
it("says nothing extra for a module that contributes nothing", async () => {
|
||||
expect(await detailsFor([discoveredModule("people")])).toEqual(["people 0.1.0"]);
|
||||
});
|
||||
|
||||
it("reports a contribution whose provider satisfies its declared range", async () => {
|
||||
const details = await detailsFor([
|
||||
providing("signage", { id: "signage.slide-renderer", version: "1.2.0" }),
|
||||
contributing("announcements", {
|
||||
capability: "signage.slide-renderer",
|
||||
capabilityRange: "^1.0.0",
|
||||
}),
|
||||
]);
|
||||
|
||||
expect(details).toEqual([
|
||||
"signage 0.1.0",
|
||||
"announcements 0.1.0 · 1 browser contribution (1 with a compatible provider)",
|
||||
]);
|
||||
});
|
||||
|
||||
it("reports a contribution nobody provides, and one outside its range, as unmatched", async () => {
|
||||
expect(
|
||||
await detailsFor([
|
||||
contributing("announcements", {
|
||||
capability: "signage.slide-renderer",
|
||||
capabilityRange: "^1.0.0",
|
||||
}),
|
||||
]),
|
||||
).toEqual(["announcements 0.1.0 · 1 browser contribution (0 with a compatible provider)"]);
|
||||
|
||||
expect(
|
||||
await detailsFor([
|
||||
providing("signage", { id: "signage.slide-renderer", version: "3.0.0" }),
|
||||
contributing("announcements", {
|
||||
capability: "signage.slide-renderer",
|
||||
capabilityRange: "^1.0.0",
|
||||
}),
|
||||
]),
|
||||
).toEqual([
|
||||
"signage 0.1.0",
|
||||
"announcements 0.1.0 · 1 browser contribution (0 with a compatible provider)",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user