diff --git a/docs/repo-strategy.md b/docs/repo-strategy.md new file mode 100644 index 0000000..893defc --- /dev/null +++ b/docs/repo-strategy.md @@ -0,0 +1,64 @@ +# Eve Repo Strategy + +Eve is a kernel, not a forever warehouse. + +The boundary rule is deliberately blunt: Eve core owns contracts. Plugins own +semantics. Runtime repos own native projection. Provider repos own live truth. + +## Kernel Scope + +`E:\Projects\Eve` may own: + +- `gamecult.eve.surface.v1`, command descriptors, binding descriptors, embedded + document slots, provider advertisements, and plugin advertisements; +- CultUI DSL syntax, compiler behavior, and style contract; +- the browser reference lowerer while it remains the behavior oracle; +- conformance harness incubation and minimal core fixtures; +- first-party runtime or plugin proofs only while their contracts are still + forming. + +Anything else is guilty until it can explain why it protects a core invariant. + +## Graduation Rules + +- A runtime splits when it has its own build/deploy lifecycle, platform SDK pain, + plugin host behavior, capture pipeline, or release cadence. +- A plugin splits when it owns domain semantics, fixtures, and conformance cases. +- A product demo splits when it carries product-specific state, assets, flows, + receipts, or deployment authority. +- Conformance splits when runtimes/plugins need to consume it without depending + on Eve source layout. + +## Target Repos + +- `Eve`: kernel contracts, specs, browser reference, and conformance incubation. +- `EvePlugins`: first-party reusable plugins while young, such as fields, + world 2D/3D, and TeX. +- `Sai`: owner for the VN/Ink plugin once `sai.vn` graduates. +- `Norn`: owner for graph plugin semantics once `norn.graph` graduates. +- `EveUnity`, `EveGodot`, `EveFlutter`, `EveElectron`, and similar runtime + repos: native projection, platform build glue, plugin host, captures, and + runtime tests. +- `EveConformance`: fixture corpus, parity runner, capability matrix, + screenshot/report artifacts, plugin packs, and CI orchestration once the + harness stops thrashing. +- Provider repos such as `Aetheria`: daemon state, authored surfaces, assets, + provider fixtures, receipts, and real app scenarios. + +## Incubation Metadata + +`tools/parity/parity-manifest.json` is the current ownership ledger. Fixtures +declare a conformance pack. Plugins declare owner repo, split target, capability +claim, required fixtures, and graduation trigger. Runtimes declare owner repo, +repo role, split target, supported features, and graduation trigger. + +The parity harness treats missing ownership metadata as a failure mode. That is +intentional. A renderer or plugin that cannot name its owner is not mature; it +is just code sharing a worktree. + +## Forbidden Shortcut + +Provider and plugin advertisements are the boundary between repos. A renderer +must not import provider or plugin internals because they happen to be nearby. +If a runtime needs an Aetheria concept, either Eve lacks a generic primitive or +Aetheria is leaking. The friction is useful. Keep it. diff --git a/plugins/incubating/norn-graph.plugin.json b/plugins/incubating/norn-graph.plugin.json new file mode 100644 index 0000000..545917f --- /dev/null +++ b/plugins/incubating/norn-graph.plugin.json @@ -0,0 +1,49 @@ +{ + "schema": "gamecult.eve.plugin.v1", + "pluginId": "norn.graph", + "title": "Norn Graph", + "owner": "Norn", + "incubation": { + "ownerRepo": "Norn", + "currentHostRepo": "Eve", + "splitTarget": "Norn/eve-plugin-graph", + "graduationTrigger": "Split when graph layout, interaction, fallback, and conformance fixtures are stable." + }, + "componentKinds": [ + "embed.norn" + ], + "commands": [ + { + "command": "graph.node.activate", + "schema": "norn.graph.command.v1", + "effect": "activate-node" + }, + { + "command": "graph.focus", + "schema": "norn.graph.command.v1", + "effect": "focus-graph" + } + ], + "stateSchemas": [ + "norn.graph.document.v1", + "norn.graph.layout_request.v1", + "norn.graph.layout_result.v1" + ], + "fixtures": [ + { + "fixtureId": "sai-vn", + "schema": "gamecult.eve.surface.v1", + "path": "web/fixtures/sai-vn-surface.json" + } + ], + "capabilities": { + "requires": [ + "embed.norn" + ], + "optionalCapabilities": [ + "graph.node.activate", + "graph.pan", + "graph.zoom" + ] + } +} diff --git a/plugins/incubating/sai-vn.plugin.json b/plugins/incubating/sai-vn.plugin.json new file mode 100644 index 0000000..5ea043d --- /dev/null +++ b/plugins/incubating/sai-vn.plugin.json @@ -0,0 +1,71 @@ +{ + "schema": "gamecult.eve.plugin.v1", + "pluginId": "sai.vn", + "title": "Sai Visual Novel", + "owner": "Sai", + "incubation": { + "ownerRepo": "Sai", + "currentHostRepo": "Eve", + "splitTarget": "Sai/sai-vn-plugin", + "graduationTrigger": "Split when VN/Ink semantics, story command fixtures, and ABI validate/apply/project cases are stable." + }, + "componentKinds": [ + "vn.stage", + "panel.dialogue", + "text.dialogue", + "rail.actions" + ], + "commands": [ + { + "command": "story.continue", + "schema": "sai.vn.story_command.v1", + "effect": "advance-story" + }, + { + "command": "story.choose", + "schema": "sai.vn.story_command.v1", + "effect": "choose-branch" + }, + { + "command": "story.jump", + "schema": "sai.vn.story_command.v1", + "effect": "jump-to-knot" + } + ], + "stateSchemas": [ + "sai.vn.story_session.v1", + "sai.vn.visual_manifest.v1" + ], + "fixtures": [ + { + "fixtureId": "sai-vn", + "schema": "gamecult.eve.surface.v1", + "path": "web/fixtures/sai-vn-surface.json" + } + ], + "capabilities": { + "requires": [ + "vn.stage", + "story.choose", + "story.continue", + "story.jump" + ], + "optionalPlugins": [ + { + "pluginId": "norn.graph", + "capabilities": [ + "embed.norn", + "graph.node.activate" + ] + }, + { + "pluginId": "tex.math", + "capabilities": [ + "embed.tex", + "tex.inline", + "tex.block" + ] + } + ] + } +} diff --git a/plugins/incubating/tex-math.plugin.json b/plugins/incubating/tex-math.plugin.json new file mode 100644 index 0000000..85bbedc --- /dev/null +++ b/plugins/incubating/tex-math.plugin.json @@ -0,0 +1,38 @@ +{ + "schema": "gamecult.eve.plugin.v1", + "pluginId": "tex.math", + "title": "TeX Math", + "owner": "EvePlugins", + "incubation": { + "ownerRepo": "EvePlugins", + "currentHostRepo": "Eve", + "splitTarget": "EvePlugins/eve-plugin-tex", + "graduationTrigger": "Split when TeX source, macro, baseline, cached render, and fallback fixtures are stable." + }, + "componentKinds": [ + "embed.tex" + ], + "commands": [], + "stateSchemas": [ + "tex.math.source.v1", + "tex.math.render_request.v1", + "tex.math.render_result.v1" + ], + "fixtures": [ + { + "fixtureId": "sai-vn", + "schema": "gamecult.eve.surface.v1", + "path": "web/fixtures/sai-vn-surface.json" + } + ], + "capabilities": { + "requires": [ + "embed.tex" + ], + "optionalCapabilities": [ + "tex.inline", + "tex.block", + "tex.scene-placement" + ] + } +} diff --git a/tools/parity/parity-manifest.json b/tools/parity/parity-manifest.json index e655f9c..70c9532 100644 --- a/tools/parity/parity-manifest.json +++ b/tools/parity/parity-manifest.json @@ -1,5 +1,32 @@ { "schema": "gamecult.eve.parity_manifest.v1", + "repoStrategy": { + "boundaryRule": "Eve core owns contracts; plugins own semantics; runtime repos own native projection; provider repos own live truth.", + "incubationPolicy": "Eve may host runtimes, plugins, and conformance packs only while their contract is still forming.", + "graduationDocument": "docs/repo-strategy.md" + }, + "conformancePacks": [ + { + "id": "core", + "ownerRepo": "Eve", + "exitCriteria": "Stays in Eve; proves surface contract, CultUI DSL, bindings, commands, and embedded documents." + }, + { + "id": "plugin", + "ownerRepo": "EvePlugins until owner repos stabilize", + "exitCriteria": "Moves when plugin semantics, fixtures, and conformance cases are stable." + }, + { + "id": "provider", + "ownerRepo": "Provider repo", + "exitCriteria": "Moves when fixture carries product-specific state, assets, flows, or receipts." + }, + { + "id": "runtime", + "ownerRepo": "Runtime repo", + "exitCriteria": "Moves when runtime has its own build/deploy lifecycle or platform SDK pressure." + } + ], "responsiveCases": [ { "id": "phone", @@ -37,6 +64,8 @@ { "id": "cultui-inspector", "title": "CultUI Inspector", + "pack": "core", + "ownerRepo": "Eve", "surface": { "transport": "local-eve-dsl", "path": "web/fixtures/cultui-slider-inspector.eve" @@ -57,6 +86,8 @@ { "id": "repixelizer", "title": "Repixelizer", + "pack": "provider", + "ownerRepo": "Repixelizer", "surface": { "transport": "local-json", "path": "web/fixtures/repixelizer.eve-surface.json" @@ -90,6 +121,22 @@ { "id": "sai-vn", "title": "Sai VN", + "pack": "plugin", + "ownerRepo": "Sai", + "requiredPlugins": [ + { + "pluginId": "sai.vn", + "capabilities": ["vn.stage", "story.choose", "story.continue", "story.jump"] + }, + { + "pluginId": "norn.graph", + "capabilities": ["embed.norn"] + }, + { + "pluginId": "tex.math", + "capabilities": ["embed.tex"] + } + ], "surface": { "transport": "local-json", "path": "web/fixtures/sai-vn-surface.json" @@ -120,6 +167,8 @@ { "id": "reactive-dsl", "title": "Reactive DSL", + "pack": "core", + "ownerRepo": "Eve", "surface": { "transport": "local-eve-dsl", "path": "web/fixtures/reactive-composition.eve" @@ -133,6 +182,8 @@ { "id": "huginn-cc", "title": "Huginn .cc", + "pack": "provider", + "ownerRepo": "Huginn", "surface": { "transport": "local-eve-dsl", "path": "web/fixtures/huginn-cc-surface.eve" @@ -142,6 +193,61 @@ "componentKinds": ["surface", "card", "text", "list"], "bindings": ["huginn.catalog.entries", "huginn.records.entries"] } + }, + { + "id": "embedded-surface", + "title": "Embedded Surface Slot", + "pack": "core", + "ownerRepo": "Eve", + "surface": { + "transport": "local-json", + "path": "web/fixtures/cultui-embedded-surface.json" + }, + "expect": { + "providerId": "gamecult.eve.embedded-demo", + "componentKinds": ["surface", "card", "text", "surface.slot"], + "embeddedDocuments": ["inventory.dropdown"], + "styleTokens": ["colorBackground", "colorPanel", "colorText", "colorMuted", "colorAccent"] + } + } + ], + "pluginManifests": [ + { + "pluginId": "sai.vn", + "title": "Sai Visual Novel", + "kind": "external-owner-planned", + "ownerRepo": "Sai", + "repoRole": "plugin-incubating", + "splitTarget": "Sai/sai-vn-plugin", + "graduationTrigger": "Split when VN/Ink semantics, story command fixtures, and ABI project/apply/validate cases are stable.", + "capabilities": ["vn.stage", "story.choose", "story.continue", "story.jump"], + "optionalPlugins": ["norn.graph", "tex.math"], + "requiredFixtures": ["sai-vn"], + "expectedPaths": ["plugins/incubating/sai-vn.plugin.json"] + }, + { + "pluginId": "norn.graph", + "title": "Norn Graph", + "kind": "external-owner-planned", + "ownerRepo": "Norn", + "repoRole": "plugin-incubating", + "splitTarget": "Norn/eve-plugin-graph", + "graduationTrigger": "Split when embed.norn graph layout, interaction, fallback, and conformance fixtures are stable.", + "capabilities": ["embed.norn", "graph.node.activate"], + "requiredFixtures": ["sai-vn"], + "expectedPaths": ["plugins/incubating/norn-graph.plugin.json"] + }, + { + "pluginId": "tex.math", + "title": "TeX Math", + "kind": "incubating", + "ownerRepo": "EvePlugins", + "repoRole": "plugin-incubating", + "splitTarget": "EvePlugins/eve-plugin-tex", + "graduationTrigger": "Split when TeX source, macro, baseline, cached render, and fallback fixtures are stable.", + "capabilities": ["embed.tex", "tex.inline", "tex.block"], + "requiredFixtures": ["sai-vn"], + "expectedPaths": ["plugins/incubating/tex-math.plugin.json"] } ], "runtimes": [ @@ -149,7 +255,34 @@ "id": "web", "title": "Web reference", "kind": "active", + "ownerRepo": "Eve", + "repoRole": "core", + "splitTarget": "EveWeb only if browser reference gains independent platform lifecycle", + "graduationTrigger": "Stay in Eve while it is the behavior oracle; split only if it becomes a deployable runtime product.", "semanticHarness": true, + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["embeddedDocuments"], + "supportedPlugins": [ + { + "pluginId": "sai.vn", + "capabilities": ["vn.stage", "story.choose", "story.continue", "story.jump"] + }, + { + "pluginId": "norn.graph", + "capabilities": ["embed.norn"] + }, + { + "pluginId": "tex.math", + "capabilities": ["embed.tex"] + } + ], + "expectedSourceSymbols": [ + { + "path": "packages/eve-browser-lowering/src/index.ts", + "contains": ["surface.slot", "embeddedDocuments", "cultui-embedded-slot"] + } + ], "capture": { "status": "chrome-headless", "note": "Chrome headless captures phone, tablet, and desktop PNGs through the provider query parameter." @@ -159,7 +292,34 @@ "id": "windows-flutter", "title": "Windows / Flutter", "kind": "active", + "ownerRepo": "Eve", + "repoRole": "runtime-incubating", + "splitTarget": "EveFlutter", + "graduationTrigger": "Split when Flutter has provider picker, command transport, plugin host, and its own build/release lifecycle.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["embeddedDocuments"], + "supportedPlugins": [ + { + "pluginId": "sai.vn", + "capabilities": ["vn.stage", "story.choose", "story.continue", "story.jump"] + }, + { + "pluginId": "norn.graph", + "capabilities": ["embed.norn"] + }, + { + "pluginId": "tex.math", + "capabilities": ["embed.tex"] + } + ], "expectedPaths": ["flutter/eve_parity/lib/main.dart", "scripts/capture-flutter-parity.ps1"], + "expectedSourceSymbols": [ + { + "path": "flutter/eve_parity/lib/main.dart", + "contains": ["embeddedDocuments", "surface.slot", "EveEmbeddedDocumentSlot"] + } + ], "capture": { "status": "golden", "note": "Uses the Flutter parity golden smoke on the Windows host." @@ -169,7 +329,34 @@ "id": "linux-flutter", "title": "Linux / Flutter", "kind": "active", + "ownerRepo": "Eve", + "repoRole": "runtime-incubating", + "splitTarget": "EveFlutter", + "graduationTrigger": "Split with EveFlutter when Linux capture and runner health become runtime-owned.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["embeddedDocuments"], + "supportedPlugins": [ + { + "pluginId": "sai.vn", + "capabilities": ["vn.stage", "story.choose", "story.continue", "story.jump"] + }, + { + "pluginId": "norn.graph", + "capabilities": ["embed.norn"] + }, + { + "pluginId": "tex.math", + "capabilities": ["embed.tex"] + } + ], "expectedPaths": ["flutter/eve_parity/linux", "scripts/capture-flutter-parity.ps1"], + "expectedSourceSymbols": [ + { + "path": "flutter/eve_parity/lib/main.dart", + "contains": ["embeddedDocuments", "surface.slot", "EveEmbeddedDocumentSlot"] + } + ], "capture": { "status": "ssh-golden", "note": "Runs the Flutter parity golden smoke on Nightwing over SSH and pulls back phone, tablet, and desktop PNGs." @@ -179,7 +366,20 @@ "id": "ios-uikit", "title": "iOS / UIKit", "kind": "active", + "ownerRepo": "Eve", + "repoRole": "runtime-incubating", + "splitTarget": "EveIOS", + "graduationTrigger": "Split when UIKit renderer has generic surface lowering, sensor edge release flow, and device CI independent of Eve core.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["embeddedDocuments"], "expectedPaths": ["Sources/EVEViewController.mm", "scripts/capture-eve-screenshot.ps1"], + "expectedSourceSymbols": [ + { + "path": "Sources/EVEViewController.mm", + "contains": ["surface.slot", "embeddedDocuments", "accessibilityIdentifier"] + } + ], "capture": { "status": "ssh-png", "note": "SSH capture script foregrounds EveCanvas and requests latest-screenshot.png." @@ -189,7 +389,34 @@ "id": "android-flutter", "title": "Android / Flutter", "kind": "active", + "ownerRepo": "Eve", + "repoRole": "runtime-incubating", + "splitTarget": "EveFlutter", + "graduationTrigger": "Split with EveFlutter when Android APK smoke, provider discovery, command transport, and plugin host are runtime-owned.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["embeddedDocuments"], + "supportedPlugins": [ + { + "pluginId": "sai.vn", + "capabilities": ["vn.stage", "story.choose", "story.continue", "story.jump"] + }, + { + "pluginId": "norn.graph", + "capabilities": ["embed.norn"] + }, + { + "pluginId": "tex.math", + "capabilities": ["embed.tex"] + } + ], "expectedPaths": ["flutter/eve_parity/lib/main.dart", "scripts/capture-android-flutter-parity.ps1"], + "expectedSourceSymbols": [ + { + "path": "flutter/eve_parity/lib/main.dart", + "contains": ["embeddedDocuments", "surface.slot", "EveEmbeddedDocumentSlot"] + } + ], "capture": { "status": "adb-png", "note": "Builds the shared Flutter parity APK, installs it on Periwinkle, and pulls responsive plus physical-panel screencaps through adb." @@ -198,17 +425,60 @@ { "id": "android-kotlin", "title": "Android / Kotlin device edge", - "kind": "compatibility", + "kind": "active", + "ownerRepo": "Eve", + "repoRole": "runtime-incubating", + "splitTarget": "EveAndroid", + "graduationTrigger": "Split when Kotlin device edge has generic surface traversal, sensor release flow, and Android-specific CI.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["cultmesh-dashboard-documents", "sensor-uplink", "embeddedDocuments"], "expectedPaths": ["android/app/src/main/java/org/gamecult/eve/MainActivity.kt", "scripts/build-android.ps1"], + "expectedSourceSymbols": [ + { + "path": "android/app/src/main/java/org/gamecult/eve/MainActivity.kt", + "contains": ["surface.slot", "embeddedDocuments", "contentDescription"] + } + ], "capture": { "status": "manual", - "note": "Native Kotlin remains a CultMesh sensor/dashboard compatibility body; it is not the GUI CultUI parity target." + "note": "Native Kotlin preserves CultUI embedded document slots in its lightweight dashboard renderer; full responsive GUI capture still belongs to Android Flutter." + } + }, + { + "id": "unity-uitoolkit", + "title": "Unity / UI Toolkit", + "kind": "active", + "ownerRepo": "Eve", + "repoRole": "runtime-incubating", + "splitTarget": "EveUnity", + "graduationTrigger": "Split when Unity package has independent UPM release, plugin host behavior, and Unity test/capture lifecycle.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": ["embeddedDocuments"], + "expectedPaths": ["packages/org.gamecult.eve.unity-uitoolkit/Runtime/EveUiToolkitSurfaceLowerer.cs"], + "expectedSourceSymbols": [ + { + "path": "packages/org.gamecult.eve.unity-uitoolkit/Runtime/EveUiToolkitSurfaceLowerer.cs", + "contains": ["LowerEmbeddedDocument(", "EmbeddedDocuments", "eve-embedded-document"] + } + ], + "capture": { + "status": "semantic", + "note": "Unity UI Toolkit lowers embedded document slots through a resolver-backed child surface host." } }, { "id": "direct2d", "title": "Fensalir Direct2D", "kind": "pending", + "ownerRepo": "Fensalir", + "repoRole": "runtime-external-target", + "splitTarget": "Fensalir or EveDirect2D if it earns a separate body", + "graduationTrigger": "Do not graduate until the Eve-to-AquariumUiDocument adapter and Direct2D frame capture exist.", + "requiredFixtures": ["embedded-surface"], + "pluginFixtures": ["sai-vn"], + "supportedFeatures": [], "expectedPaths": ["web/fixtures/fensalir-client-surface.json"], "capture": { "status": "missing", diff --git a/tools/parity/run-parity.mjs b/tools/parity/run-parity.mjs index 5447cea..97cdd57 100644 --- a/tools/parity/run-parity.mjs +++ b/tools/parity/run-parity.mjs @@ -21,14 +21,18 @@ for (const fixture of manifest.fixtures) { fixtureResults.push(await evaluateFixture(fixture)); } -const runtimeResults = manifest.runtimes.map(evaluateRuntime); +const pluginResults = await Promise.all((manifest.pluginManifests || []).map(plugin => evaluatePlugin(plugin, fixtureResults))); +const runtimeResults = await Promise.all(manifest.runtimes.map(runtime => evaluateRuntime(runtime, fixtureResults))); const report = { schema: "gamecult.eve.parity_report.v1", generatedAt: new Date().toISOString(), manifest: path.relative(repoRoot, manifestPath).replaceAll("\\", "/"), + repoStrategy: manifest.repoStrategy || {}, + conformancePacks: manifest.conformancePacks || [], responsiveCases: manifest.responsiveCases || [], - summary: summarize(fixtureResults, runtimeResults), + summary: summarize(fixtureResults, runtimeResults, pluginResults), fixtures: fixtureResults, + plugins: pluginResults, runtimes: runtimeResults, }; @@ -47,6 +51,10 @@ async function evaluateFixture(fixture) { const nodes = root ? flattenSurface(root) : []; const kindCounts = countBy(nodes, node => node.kind || "unknown"); const bindings = [...new Set(nodes.flatMap(readBindings))].sort(); + const embeddedDocuments = [...new Set(nodes + .flatMap(node => node.embeddedDocuments || []) + .map(slot => slot.slotId || slot.documentId) + .filter(Boolean))].sort(); const controlSkins = state.surface?.styles?.controlSkins || {}; const skinNames = Object.keys(controlSkins); const skinNodes = Object.values(controlSkins).flatMap(skin => skin.children || []); @@ -104,9 +112,32 @@ async function evaluateFixture(fixture) { }); } + for (const slot of fixture.expect.embeddedDocuments || []) { + addCheck(checks, `embedded:${slot}`, embeddedDocuments.includes(slot), { + expected: "present", + actual: embeddedDocuments, + }); + } + + const knownPacks = new Set((manifest.conformancePacks || []).map(pack => pack.id)); + if (fixture.pack) { + addCheck(checks, "conformancePack", knownPacks.has(fixture.pack), { + expected: [...knownPacks].sort(), + actual: fixture.pack, + }); + } else { + addCheck(checks, "conformancePack", false, { + expected: "fixture declares pack", + actual: "", + }); + } + return { id: fixture.id, title: fixture.title, + pack: fixture.pack || "", + ownerRepo: fixture.ownerRepo || "", + requiredPlugins: fixture.requiredPlugins || [], status: checks.every(check => check.pass) ? "pass" : "fail", durationMs: Date.now() - startedAt, providerId: state.providerId, @@ -116,6 +147,7 @@ async function evaluateFixture(fixture) { controlSkins: skinNames, controlParts: controlPartNames, bindings, + embeddedDocuments, checks, }; } @@ -128,12 +160,41 @@ async function loadSurface(surface) { throw new Error(`Unsupported parity surface transport: ${surface.transport}`); } -function evaluateRuntime(runtime) { +async function evaluateRuntime(runtime, fixtureResults) { const expectedPaths = runtime.expectedPaths || []; const missingPaths = expectedPaths.filter(candidate => !existsSync(path.join(repoRoot, candidate))); + const expectedSourceSymbols = runtime.expectedSourceSymbols || []; + const missingSourceSymbols = []; + for (const expectation of expectedSourceSymbols) { + const sourcePath = expectation.path || ""; + const absolutePath = path.join(repoRoot, sourcePath); + if (!existsSync(absolutePath)) { + missingSourceSymbols.push(`${sourcePath}:missing`); + continue; + } + + const source = await readFile(absolutePath, "utf8"); + for (const symbol of expectation.contains || []) { + if (!source.includes(symbol)) missingSourceSymbols.push(`${sourcePath}:${symbol}`); + } + } + const requiredFixtures = runtime.requiredFixtures || []; + const missingRequiredFixtures = requiredFixtures.filter(id => !fixtureResults.some(fixture => fixture.id === id && fixture.status === "pass")); + const supportedFeatures = runtime.supportedFeatures || []; + const supportedPlugins = runtime.supportedPlugins || []; + const missingRequiredFeatures = []; + if (requiredFixtures.includes("embedded-surface") && !supportedFeatures.includes("embeddedDocuments")) { + missingRequiredFeatures.push("embeddedDocuments"); + } + const missingIncubationFields = requiredIncubationFields(runtime).filter(field => !runtime[field]); + const pluginCapabilityGaps = collectPluginCapabilityGaps(runtime, fixtureResults); let status = runtime.kind === "active" ? "active" : "pending"; if (missingPaths.length) status = "missing-body"; - if (runtime.id === "web") status = "active"; + if (runtime.kind === "active" && missingSourceSymbols.length) status = "missing-source-symbol"; + if (runtime.kind === "active" && missingRequiredFixtures.length) status = "missing-required-fixture"; + if (runtime.kind === "active" && missingRequiredFeatures.length) status = "missing-required-feature"; + if (runtime.kind === "active" && missingIncubationFields.length) status = "missing-incubation-metadata"; + if (runtime.kind === "active" && pluginCapabilityGaps.length && status === "active") status = "active-with-capability-gaps"; if (["ssh-png", "adb-png", "golden"].includes(runtime.capture?.status) && status === "pending") { status = "capture-ready"; } @@ -145,10 +206,87 @@ function evaluateRuntime(runtime) { semanticHarness: Boolean(runtime.semanticHarness), expectedPaths, missingPaths, + expectedSourceSymbols, + missingSourceSymbols, + requiredFixtures, + pluginFixtures: runtime.pluginFixtures || [], + missingRequiredFixtures, + supportedFeatures, + supportedPlugins, + missingRequiredFeatures, + ownerRepo: runtime.ownerRepo || "", + repoRole: runtime.repoRole || "", + graduationTrigger: runtime.graduationTrigger || "", + splitTarget: runtime.splitTarget || "", + missingIncubationFields, + pluginCapabilityGaps, capture: runtime.capture, }; } +async function evaluatePlugin(plugin, fixtureResults) { + const expectedPaths = plugin.expectedPaths || []; + const missingPaths = expectedPaths.filter(candidate => !existsSync(path.join(repoRoot, candidate))); + const requiredFixtures = plugin.requiredFixtures || []; + const missingRequiredFixtures = requiredFixtures.filter(id => !fixtureResults.some(fixture => fixture.id === id && fixture.status === "pass")); + const missingIncubationFields = requiredIncubationFields(plugin).filter(field => !plugin[field]); + const status = missingPaths.length + ? "missing-body" + : missingRequiredFixtures.length + ? "missing-required-fixture" + : missingIncubationFields.length + ? "missing-incubation-metadata" + : plugin.kind === "incubating" + ? "incubating" + : "external-owner-planned"; + + return { + pluginId: plugin.pluginId, + title: plugin.title, + kind: plugin.kind, + ownerRepo: plugin.ownerRepo || "", + repoRole: plugin.repoRole || "", + graduationTrigger: plugin.graduationTrigger || "", + splitTarget: plugin.splitTarget || "", + capabilities: plugin.capabilities || [], + optionalPlugins: plugin.optionalPlugins || [], + requiredFixtures, + missingRequiredFixtures, + expectedPaths, + missingPaths, + missingIncubationFields, + status, + }; +} + +function collectPluginCapabilityGaps(runtime, fixtureResults) { + const supported = new Map((runtime.supportedPlugins || []).map(plugin => [plugin.pluginId, new Set(plugin.capabilities || [])])); + const fixtureById = new Map((manifest.fixtures || []).map(fixture => [fixture.id, fixture])); + const gaps = []; + const fixtureIds = [...new Set([...(runtime.requiredFixtures || []), ...(runtime.pluginFixtures || [])])]; + for (const fixtureId of fixtureIds) { + const fixtureResult = fixtureResults.find(fixture => fixture.id === fixtureId); + if (!fixtureResult || fixtureResult.status !== "pass") continue; + const fixture = fixtureById.get(fixtureId); + for (const requirement of fixture?.requiredPlugins || []) { + const capabilities = supported.get(requirement.pluginId); + if (!capabilities) { + gaps.push(`${fixtureId}:${requirement.pluginId}`); + continue; + } + for (const capability of requirement.capabilities || []) { + if (!capabilities.has(capability)) gaps.push(`${fixtureId}:${requirement.pluginId}:${capability}`); + } + } + } + return gaps; +} + +function requiredIncubationFields(entry) { + if (entry.repoRole === "core") return ["ownerRepo", "repoRole"]; + return ["ownerRepo", "repoRole", "graduationTrigger"]; +} + function flattenSurface(root) { const nodes = []; const visit = (node) => { @@ -180,11 +318,13 @@ function addCheck(checks, id, pass, detail) { checks.push({ id, pass, ...detail }); } -function summarize(fixtures, runtimes) { +function summarize(fixtures, runtimes, plugins) { return { totalFixtures: fixtures.length, passedFixtures: fixtures.filter(fixture => fixture.status === "pass").length, failedFixtures: fixtures.filter(fixture => fixture.status !== "pass").length, + totalPlugins: plugins.length, + healthyPlugins: plugins.filter(plugin => plugin.status === "incubating" || plugin.status === "external-owner-planned").length, totalRuntimes: runtimes.length, activeRuntimes: runtimes.filter(runtime => runtime.status === "active").length, pendingRuntimes: runtimes.filter(runtime => runtime.status !== "active").length, @@ -200,13 +340,31 @@ function renderMarkdown(report) { "## Summary", "", `- Fixtures: ${report.summary.passedFixtures}/${report.summary.totalFixtures} passed`, + `- Plugins: ${report.summary.healthyPlugins}/${report.summary.totalPlugins} declared`, `- Runtimes: ${report.summary.activeRuntimes}/${report.summary.totalRuntimes} active`, + "", + "## Repo Strategy", + "", + `- Boundary rule: ${report.repoStrategy.boundaryRule || "not declared"}`, + `- Incubation policy: ${report.repoStrategy.incubationPolicy || "not declared"}`, + "", + "## Conformance Packs", + "", + "| Pack | Owner | Exit |", + "| --- | --- | --- |", + ]; + + for (const pack of report.conformancePacks || []) { + lines.push(`| ${pack.id} | ${pack.ownerRepo || ""} | ${pack.exitCriteria || ""} |`); + } + + lines.push( "", "## Responsive Cases", "", "| Case | Size |", "| --- | --- |", - ]; + ); for (const viewport of report.responsiveCases || []) { lines.push(`| ${viewport.id} | ${viewport.width} x ${viewport.height} |`); @@ -216,18 +374,35 @@ function renderMarkdown(report) { "", "## Fixtures", "", - "| Fixture | Status | Provider | Components | Failed Checks |", - "| --- | --- | --- | ---: | --- |", + "| Fixture | Pack | Status | Provider | Components | Failed Checks |", + "| --- | --- | --- | --- | ---: | --- |", ); for (const fixture of report.fixtures) { const failed = fixture.checks.filter(check => !check.pass).map(check => check.id).join(", ") || ""; - lines.push(`| ${fixture.title} | ${fixture.status} | ${fixture.providerId} | ${fixture.componentCount} | ${failed} |`); + lines.push(`| ${fixture.title} | ${fixture.pack} | ${fixture.status} | ${fixture.providerId} | ${fixture.componentCount} | ${failed} |`); } - lines.push("", "## Runtimes", "", "| Runtime | Status | Capture | Missing Paths |", "| --- | --- | --- | --- |"); + lines.push("", "## Plugins", "", "| Plugin | Status | Owner | Capabilities | Missing |", "| --- | --- | --- | --- | --- |"); + for (const plugin of report.plugins || []) { + const missing = [ + ...plugin.missingPaths, + ...plugin.missingRequiredFixtures.map(id => `fixture:${id}`), + ...plugin.missingIncubationFields.map(id => `metadata:${id}`), + ].join(", "); + lines.push(`| ${plugin.title || plugin.pluginId} | ${plugin.status} | ${plugin.ownerRepo} | ${plugin.capabilities.join(", ")} | ${missing} |`); + } + + lines.push("", "## Runtimes", "", "| Runtime | Status | Owner | Capture | Required Fixtures | Plugin Fixtures | Features | Plugin Gaps | Missing |", "| --- | --- | --- | --- | --- | --- | --- | --- | --- |"); for (const runtime of report.runtimes) { - lines.push(`| ${runtime.title} | ${runtime.status} | ${runtime.capture?.status || "unknown"} | ${runtime.missingPaths.join(", ")} |`); + const missing = [ + ...runtime.missingPaths, + ...runtime.missingSourceSymbols.map(id => `source:${id}`), + ...runtime.missingRequiredFixtures.map(id => `fixture:${id}`), + ...runtime.missingRequiredFeatures.map(id => `feature:${id}`), + ...runtime.missingIncubationFields.map(id => `metadata:${id}`), + ].join(", "); + lines.push(`| ${runtime.title} | ${runtime.status} | ${runtime.ownerRepo} | ${runtime.capture?.status || "unknown"} | ${runtime.requiredFixtures.join(", ")} | ${runtime.pluginFixtures.join(", ")} | ${runtime.supportedFeatures.join(", ")} | ${runtime.pluginCapabilityGaps.join(", ")} | ${missing} |`); } lines.push("", "## Runtime Notes", "");