Graduate conformance authority from Eve

This commit is contained in:
Meta Vens 2026-07-10 10:35:26 +01:00
commit 44649e4c9f
19 changed files with 195 additions and 9595 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,67 +1,30 @@
# Eve Repo Strategy
# Eve Repository Strategy
Eve is a kernel, not a forever warehouse.
Eve is a kernel, not a warehouse.
The boundary rule is deliberately blunt: Eve core owns contracts. Plugins own
semantics. Runtime repos own native projection. Provider repos own live truth.
## Ownership
## Kernel Scope
- `Eve` owns contracts, CultUI, the browser reference oracle, and minimal core
fixtures.
- `EveConformance` owns the parity matrix, runner, exported packs, witnesses,
and CI orchestration.
- `EvePlugins` incubates reusable first-party semantic sidecars; Sai, Norn, and
other domain owners take stable semantics into their own repos.
- Runtime repos own native lowering, platform builds, plugin transport, tests,
and captures.
- Provider repos own state, authored surfaces, assets, commands, receipts, and
product scenarios.
`E:\Projects\Eve` may own:
Repositories communicate through schemas, advertisements, CultNet/CultMesh
documents, packages, and conformance exports. A sibling checkout may support
development, but it is never an authority boundary.
- `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.
## Graduation
Anything else is guilty until it can explain why it protects a core invariant.
- Split a runtime when it has an independent build/deploy lifecycle.
- Split a plugin when it owns domain semantics and conformance fixtures.
- Move a fixture when it contains product-specific truth.
- Publish a package when consumers should no longer depend on source layout.
## Graduation Rules
- A runtime splits when it has its own build/deploy lifecycle, platform SDK pain,
plugin projection 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. These plugins are independent sidecar capabilities, not
hidden features of Sai or any other provider.
- `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 projection adapters,
captures, and runtime tests. Runtime plugin projection adapters lower
sidecar-advertised output; they do not host Sai, Norn, TeX, or any other
plugin's semantic authority.
- `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.
The useful friction is deliberate: if a generic runtime needs an Aetheria
internal, either Eve lacks a generic contract or Aetheria is leaking authority.

View file

@ -32,7 +32,8 @@ if (Test-Path $consumerExport) {
New-Item -ItemType Directory -Force -Path $consumerRoot | Out-Null
Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
$consumerScript = Join-Path $projectRoot "tools\conformance\consume-export.mjs"
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$consumerScript = Join-Path $conformanceRoot "tools\conformance\consume-export.mjs"
Push-Location $AetheriaRoot
try {
@ -93,8 +94,7 @@ try {
--expect-provider-command aetheria:aetheria.daemon.commands `
--expect-provider-receipt-state aetheria:accepted `
--expect-provider-receipt-state aetheria:pending `
--expect-provider-receipt-state aetheria:reconciled `
--expect-provider-handoff-move aetheria:provider-scenario:current:exists:run-aetheria-conformance-consumer-smoke.ps1
--expect-provider-receipt-state aetheria:reconciled
if ($LASTEXITCODE -ne 0) {
throw "Aetheria conformance consumer smoke failed with exit code $LASTEXITCODE"
}

View file

@ -6,6 +6,8 @@ param(
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $PSScriptRoot
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$consumerScript = Join-Path $conformanceRoot "tools\conformance\consume-export.mjs"
$sourceExport = if ([System.IO.Path]::IsPathRooted($ExportDirectory)) {
$ExportDirectory
} else {
@ -30,10 +32,9 @@ Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
Push-Location $projectRoot
try {
node .\tools\conformance\consume-export.mjs $consumerExport `
node $consumerScript $consumerExport `
--expect-capability-matrix `
--expect-schema gamecult.eve.conformance_export.v1 `
--expect-schema gamecult.eve.conformance_handoff.v1 `
--expect-schema gamecult.eve.capability_matrix.v1 `
--expect-schema gamecult.eve.command_receipt.v1 `
--expect-schema gamecult.eve.plugin_receipt.v1 `
@ -104,8 +105,7 @@ try {
--expect-runtime-witness electron-shell:eve.world-smoke:eve.world-smoke.surface:cold:pass `
--expect-runtime-witness electron-shell:aetheria:aetheria.daemon.game:cold:pass `
--expect-runtime-capture-probe tui:contract-artifact-present:json-grid:EveTui `
--expect-capability-gap "split-target:EveUnity:EveUnity:proof:Tagged UPM release" `
--expect-conformance-handoff
--expect-capability-gap "split-target:EveUnity:EveUnity:proof:Tagged UPM release"
if ($LASTEXITCODE -ne 0) {
throw "Conformance consumer smoke failed with exit code $LASTEXITCODE"
}

View file

@ -1,170 +0,0 @@
param(
[string] $HandoffPath = "tools\conformance\eveconformance-handoff.json",
[string] $ManifestPath = "tools\parity\parity-manifest.json",
[string] $ExportDirectory = "artifacts\conformance\latest"
)
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $PSScriptRoot
$absoluteHandoffPath = if ([System.IO.Path]::IsPathRooted($HandoffPath)) {
$HandoffPath
} else {
Join-Path $projectRoot $HandoffPath
}
$absoluteManifestPath = if ([System.IO.Path]::IsPathRooted($ManifestPath)) {
$ManifestPath
} else {
Join-Path $projectRoot $ManifestPath
}
$absoluteExportDirectory = if ([System.IO.Path]::IsPathRooted($ExportDirectory)) {
$ExportDirectory
} else {
Join-Path $projectRoot $ExportDirectory
}
if (-not (Test-Path -LiteralPath $absoluteHandoffPath)) {
throw "EveConformance handoff manifest not found: $absoluteHandoffPath"
}
if (-not (Test-Path -LiteralPath $absoluteManifestPath)) {
throw "Parity manifest not found: $absoluteManifestPath"
}
$handoff = Get-Content -LiteralPath $absoluteHandoffPath -Raw | ConvertFrom-Json
$manifest = Get-Content -LiteralPath $absoluteManifestPath -Raw | ConvertFrom-Json
if ($handoff.schema -ne "gamecult.eve.conformance_handoff.v1") {
throw "Unexpected EveConformance handoff schema: $($handoff.schema)"
}
if ($handoff.splitTarget -ne "EveConformance") {
throw "Unexpected EveConformance handoff split target: $($handoff.splitTarget)"
}
if ($handoff.ownerRepo -ne "EveConformance") {
throw "Unexpected EveConformance handoff owner: $($handoff.ownerRepo)"
}
if ($handoff.currentHostRepo -ne "Eve") {
throw "Unexpected EveConformance handoff host: $($handoff.currentHostRepo)"
}
$expectedPath = $HandoffPath.Replace("\", "/")
if ($manifest.repoStrategy.conformanceHandoffPath -ne $expectedPath) {
throw "Parity manifest does not point at EveConformance handoff. Expected $expectedPath got $($manifest.repoStrategy.conformanceHandoffPath)"
}
foreach ($id in @("conformance-runner", "conformance-schemas", "consumer-smokes", "fixture-corpus")) {
$moveSet = @($handoff.moveSets) | Where-Object { $_.id -eq $id } | Select-Object -First 1
if (-not $moveSet) {
throw "EveConformance handoff missing move set: $id"
}
if ($moveSet.destinationOwner -ne "EveConformance") {
throw "EveConformance move set $id has unexpected destination owner: $($moveSet.destinationOwner)"
}
if (-not $moveSet.replacementProof) {
throw "EveConformance move set $id missing replacement proof"
}
foreach ($relativePath in @($moveSet.currentPaths)) {
$absolutePath = Join-Path $projectRoot $relativePath
if (-not (Test-Path -LiteralPath $absolutePath)) {
throw "EveConformance move set $id references missing current path: $relativePath"
}
}
}
foreach ($contract in @(
"gamecult.eve.surface.v1",
"gamecult.eve.command.v1",
"gamecult.eve.command_receipt.v1",
"gamecult.eve.conformance_export.v1",
"gamecult.eve.conformance_handoff.v1",
"gamecult.eve.capability_matrix.v1",
"gamecult.eve.conformance_fixture.v1",
"gamecult.eve.provider_scenario.v1",
"gamecult.eve.plugin.v1",
"gamecult.eve.plugin_receipt.v1",
"gamecult.eve.plugin_advertisement.v1",
"gamecult.eve.plugin_handoff.v1",
"gamecult.eve.plugin_abi_fixture.v1",
"gamecult.eve.plugin_abi.request.v1",
"gamecult.eve.plugin_abi.response.v1",
"gamecult.eve.runtime_release_request.v1",
"gamecult.eve.runtime_capture_request.v1",
"gamecult.eve.provider_advertisement.v1",
"gamecult.eve.provider_handoff.v1",
"gamecult.eve.electron_shell_projection.v1",
"gamecult.eve.unity_scene_projection.v1",
"gamecult.eve.unity_playable_world_asset_manifest.v1",
"gamecult.eve.tui_grid.v1",
"gamecult.eve.web_layout_probe.v1",
"gamecult.eve.runtime_capability.v1",
"gamecult.eve.runtime_lifecycle.v1",
"gamecult.eve.runtime_split_handoff.v1"
)) {
if (-not (@($handoff.contractInputs) -contains $contract)) {
throw "EveConformance handoff missing contract input: $contract"
}
}
if (Test-Path -LiteralPath (Join-Path $absoluteExportDirectory "index.json")) {
$export = Get-Content -LiteralPath (Join-Path $absoluteExportDirectory "index.json") -Raw | ConvertFrom-Json
if ($export.conformanceHandoffPath -ne $expectedPath) {
throw "Conformance export does not point at EveConformance handoff. Expected $expectedPath got $($export.conformanceHandoffPath)"
}
if (-not $export.conformanceHandoffExportPath) {
throw "Conformance export missing EveConformance handoff export path"
}
if (-not (Test-Path -LiteralPath (Join-Path $absoluteExportDirectory $export.conformanceHandoffExportPath))) {
throw "Conformance export missing EveConformance handoff document: $($export.conformanceHandoffExportPath)"
}
foreach ($packId in @("core", "plugin", "provider", "runtime")) {
$pack = @($export.packs) | Where-Object { $_.id -eq $packId } | Select-Object -First 1
if (-not $pack) {
throw "Conformance export missing pack: $packId"
}
}
foreach ($schemaId in @(
"gamecult.eve.conformance_export.v1",
"gamecult.eve.conformance_handoff.v1",
"gamecult.eve.capability_matrix.v1",
"gamecult.eve.conformance_fixture.v1",
"gamecult.eve.provider_scenario.v1",
"gamecult.eve.provider_advertisement.v1",
"gamecult.eve.provider_handoff.v1",
"gamecult.eve.electron_shell_projection.v1",
"gamecult.eve.unity_scene_projection.v1",
"gamecult.eve.unity_playable_world_asset_manifest.v1",
"gamecult.eve.tui_grid.v1",
"gamecult.eve.web_layout_probe.v1",
"gamecult.eve.runtime_capability.v1",
"gamecult.eve.runtime_lifecycle.v1",
"gamecult.eve.runtime_split_handoff.v1",
"gamecult.eve.command_receipt.v1",
"gamecult.eve.plugin.v1",
"gamecult.eve.plugin_receipt.v1",
"gamecult.eve.plugin_advertisement.v1",
"gamecult.eve.plugin_handoff.v1",
"gamecult.eve.plugin_abi_fixture.v1",
"gamecult.eve.plugin_abi.request.v1",
"gamecult.eve.plugin_abi.response.v1",
"gamecult.eve.runtime_release_request.v1",
"gamecult.eve.runtime_capture_request.v1"
)) {
$schema = @($export.schemaCatalog) | Where-Object { $_.schemaId -eq $schemaId } | Select-Object -First 1
if (-not $schema) {
throw "Conformance export schema catalog missing schema: $schemaId"
}
if (-not $schema.exportPath) {
throw "Conformance export schema catalog missing export path for schema: $schemaId"
}
if (-not (Test-Path -LiteralPath (Join-Path $absoluteExportDirectory $schema.exportPath))) {
throw "Conformance export missing copied schema document for $($schemaId): $($schema.exportPath)"
}
}
}
foreach ($proof in @($handoff.requiredExternalProofs)) {
if (-not $proof) {
throw "EveConformance handoff contains an empty required external proof"
}
}
Write-Host "EveConformance handoff smoke passed: $absoluteHandoffPath"

View file

@ -25,7 +25,9 @@ if ($runtimeSources -match "aetheria|repixelizer|gamecult\.home") {
}
New-Item -ItemType Directory -Force -Path $fontDirectory | Out-Null
node (Join-Path (Split-Path -Parent $PSScriptRoot) "tools\parity\export-fixture.mjs") cultui-inspector $surfacePath
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$env:EVE_KERNEL_ROOT = Split-Path -Parent $PSScriptRoot
node (Join-Path $conformanceRoot "tools\parity\export-fixture.mjs") cultui-inspector $surfacePath
if ($LASTEXITCODE -ne 0) { throw "Eve fixture export for EveFlutter failed." }
Copy-Item -LiteralPath (Join-Path $FlutterRoot "bin\cache\artifacts\material_fonts\roboto-regular.ttf") -Destination (Join-Path $fontDirectory "Roboto-Regular.ttf") -Force
Copy-Item -LiteralPath (Join-Path $FlutterRoot "bin\cache\artifacts\material_fonts\roboto-bold.ttf") -Destination (Join-Path $fontDirectory "Roboto-Bold.ttf") -Force

View file

@ -5,6 +5,10 @@ param(
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $PSScriptRoot
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
if (-not (Test-Path (Join-Path $conformanceRoot "tools\parity\run-parity.mjs"))) {
throw "EveConformance checkout not found: $conformanceRoot"
}
$env:EVE_PARITY_OUTPUT = if ([System.IO.Path]::IsPathRooted($OutputDirectory)) {
$OutputDirectory
} else {
@ -39,17 +43,18 @@ try {
-ExpectedSurfaceId "eve.world-smoke.surface" `
-ExpectedCommandBoundary "eve.world-smoke.commands" `
-ExpectedReceiptSchema "eve.world_smoke.command_receipt.v1"
node .\tools\parity\run-parity.mjs
node .\tools\conformance\attach-runtime-witness.mjs `
$env:EVE_KERNEL_ROOT = $projectRoot
$env:EVE_CONFORMANCE_OUTPUT = Join-Path $projectRoot "artifacts\conformance"
node (Join-Path $conformanceRoot "tools\parity\run-parity.mjs")
node (Join-Path $conformanceRoot "tools\conformance\attach-runtime-witness.mjs") `
"E:\Projects\EveElectron\artifacts\capture\generic-world\runtime-witness.json" `
".\artifacts\conformance\latest"
node .\tools\conformance\attach-runtime-witness.mjs `
node (Join-Path $conformanceRoot "tools\conformance\attach-runtime-witness.mjs") `
"E:\Projects\EveElectron\artifacts\capture\aetheria-world\runtime-witness.json" `
".\artifacts\conformance\latest"
node .\tools\conformance\attach-plugin-witness.mjs `
node (Join-Path $conformanceRoot "tools\conformance\attach-plugin-witness.mjs") `
"E:\Projects\EvePlugins\artifacts\tex-math\runtime-witness.json" `
".\artifacts\conformance\latest"
& (Join-Path $PSScriptRoot "run-eveconformance-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-eveelectron-owner-smoke.ps1")
& (Join-Path $PSScriptRoot "run-evetui-split-handoff-smoke.ps1")
& (Join-Path $PSScriptRoot "run-evetui-lifecycle-smoke.ps1")

View file

@ -11,7 +11,9 @@ $projectRoot = Split-Path -Parent $PSScriptRoot
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$runRoot = Join-Path $projectRoot (Join-Path $OutputDirectory $stamp)
New-Item -ItemType Directory -Force $runRoot | Out-Null
$manifest = Get-Content (Join-Path $projectRoot "tools\parity\parity-manifest.json") | ConvertFrom-Json
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$manifest = Get-Content (Join-Path $conformanceRoot "tools\parity\parity-manifest.json") | ConvertFrom-Json
$env:EVE_KERNEL_ROOT = $projectRoot
$responsiveCases = @($manifest.responsiveCases)
$androidDeviceCases = @($manifest.androidDeviceCases)
@ -82,7 +84,7 @@ try {
throw "Semantic parity harness failed with exit code $LASTEXITCODE"
}
$flutterSurface = Join-Path $runRoot "flutter-current-surface.json"
node .\tools\parity\export-fixture.mjs $ProviderId $flutterSurface | Out-Host
node (Join-Path $conformanceRoot "tools\parity\export-fixture.mjs") $ProviderId $flutterSurface | Out-Host
if ($LASTEXITCODE -ne 0) { throw "Flutter fixture export failed with exit code $LASTEXITCODE" }
foreach ($case in $responsiveCases) {
@ -97,7 +99,7 @@ try {
Invoke-Capture "ios" {
$iosFixture = Join-Path $runRoot "ios-current-surface.json"
node .\tools\parity\export-fixture.mjs $ProviderId $iosFixture | Out-Host
node (Join-Path $conformanceRoot "tools\parity\export-fixture.mjs") $ProviderId $iosFixture | Out-Host
powershell -ExecutionPolicy Bypass -File .\scripts\capture-eve-screenshot.ps1 `
-Target $IosSshTarget `
-OutputDirectory $runRoot `

View file

@ -28,7 +28,8 @@ if (Test-Path $consumerExport) {
New-Item -ItemType Directory -Force -Path $consumerRoot | Out-Null
Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
$consumerScript = Join-Path $projectRoot "tools\conformance\consume-export.mjs"
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$consumerScript = Join-Path $conformanceRoot "tools\conformance\consume-export.mjs"
node $consumerScript $consumerExport `
--expect-pack plugin `

View file

@ -28,7 +28,8 @@ if (Test-Path $consumerExport) {
New-Item -ItemType Directory -Force -Path $consumerRoot | Out-Null
Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
$consumerScript = Join-Path $projectRoot "tools\conformance\consume-export.mjs"
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$consumerScript = Join-Path $conformanceRoot "tools\conformance\consume-export.mjs"
node $consumerScript $consumerExport `
--expect-pack runtime `

View file

@ -6,6 +6,8 @@ param(
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $PSScriptRoot
$conformanceRoot = if ($env:EVE_CONFORMANCE_ROOT) { $env:EVE_CONFORMANCE_ROOT } else { "E:\Projects\EveConformance" }
$consumerScript = Join-Path $conformanceRoot "tools\conformance\consume-export.mjs"
$sourcePath = if ([System.IO.Path]::IsPathRooted($SourceDirectory)) {
$SourceDirectory
} else {
@ -30,7 +32,7 @@ Copy-Item -LiteralPath $sourcePath -Destination $exportPath -Recurse
Push-Location $projectRoot
try {
node .\tools\conformance\consume-export.mjs $exportPath `
node $consumerScript $exportPath `
--expect-split-target EveFlutter `
--expect-split-target-status EveFlutter:incubating `
--expect-split-target-proof "EveFlutter:Provider picker consumes provider advertisements" `

View file

@ -1,44 +0,0 @@
import { mkdir, readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { validateSchemaSubset } from "../../runtimes/incubating/test-support/schema-subset.mjs";
const [witnessArgument, exportArgument] = process.argv.slice(2);
if (!witnessArgument || !exportArgument) {
console.error("Usage: node tools/conformance/attach-plugin-witness.mjs <plugin-witness.json> <conformance-export-directory>");
process.exit(2);
}
const witnessPath = path.resolve(witnessArgument);
const exportDirectory = path.resolve(exportArgument);
const indexPath = path.join(exportDirectory, "index.json");
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const witness = parseJson(await readFile(witnessPath, "utf8"));
const schema = parseJson(await readFile(path.join(repoRoot, "schemas/gamecult.eve.plugin_witness.v1.schema.json"), "utf8"));
const schemaErrors = validateSchemaSubset(schema, witness);
if (schemaErrors.length) throw new Error(`Plugin witness schema errors: ${schemaErrors.join("; ")}`);
const attachmentRoot = path.join(exportDirectory, "attachments", "plugin", safeSegment(witness.witnessId));
await mkdir(attachmentRoot, { recursive: true });
const exportedWitnessPath = path.join(attachmentRoot, "witness.json");
await writeFile(exportedWitnessPath, `${JSON.stringify(witness, null, 2)}\n`);
const index = parseJson(await readFile(indexPath, "utf8"));
const record = {
witnessId: witness.witnessId,
pluginId: witness.pluginId,
ownerRepo: witness.ownerRepo,
status: witness.status,
transport: witness.transport,
operationCount: witness.operations.length,
witnessExportPath: slash(path.relative(exportDirectory, exportedWitnessPath)),
};
index.pluginWitnesses = [
...(Array.isArray(index.pluginWitnesses) ? index.pluginWitnesses : []).filter(candidate => candidate.witnessId !== record.witnessId),
record,
].sort((left, right) => left.witnessId.localeCompare(right.witnessId));
await writeFile(indexPath, `${JSON.stringify(index, null, 2)}\n`);
console.log(exportedWitnessPath);
function safeSegment(value) { return String(value).replace(/[^a-zA-Z0-9._-]+/g, "-"); }
function slash(value) { return value.replaceAll("\\", "/"); }
function parseJson(value) { return JSON.parse(value.replace(/^\uFEFF/, "")); }

View file

@ -1,78 +0,0 @@
import { copyFile, mkdir, readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { validateSchemaSubset } from "../../runtimes/incubating/test-support/schema-subset.mjs";
const [witnessArgument, exportArgument] = process.argv.slice(2);
if (!witnessArgument || !exportArgument) {
console.error("Usage: node tools/conformance/attach-runtime-witness.mjs <runtime-witness.json> <conformance-export-directory>");
process.exit(2);
}
const witnessPath = path.resolve(witnessArgument);
const exportDirectory = path.resolve(exportArgument);
const indexPath = path.join(exportDirectory, "index.json");
const witness = parseJson(await readFile(witnessPath, "utf8"));
validateWitness(witness);
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const witnessSchema = parseJson(await readFile(path.join(repoRoot, "schemas/gamecult.eve.runtime_witness.v1.schema.json"), "utf8"));
const schemaErrors = validateSchemaSubset(witnessSchema, witness);
if (schemaErrors.length) throw new Error(`Runtime witness schema errors: ${schemaErrors.join("; ")}`);
const attachmentRoot = path.join(exportDirectory, "attachments", "runtime", safeSegment(witness.witnessId));
await mkdir(attachmentRoot, { recursive: true });
const artifacts = [];
for (const artifact of witness.artifacts) {
const sourcePath = path.resolve(path.dirname(witnessPath), artifact.path);
const fileName = path.basename(sourcePath);
const destinationPath = path.join(attachmentRoot, fileName);
await copyFile(sourcePath, destinationPath);
artifacts.push({
...artifact,
exportPath: slash(path.relative(exportDirectory, destinationPath)),
});
}
const exportedWitness = { ...witness, artifacts };
const exportedWitnessPath = path.join(attachmentRoot, "witness.json");
await writeFile(exportedWitnessPath, `${JSON.stringify(exportedWitness, null, 2)}\n`);
const index = parseJson(await readFile(indexPath, "utf8"));
const record = {
witnessId: witness.witnessId,
runtimeId: witness.runtimeId,
runtimeOwnerRepo: witness.runtimeOwnerRepo,
providerId: witness.providerId,
surfaceId: witness.surfaceId,
projectionKind: witness.projectionKind,
status: witness.status,
cacheState: witness.execution.cacheState,
witnessExportPath: slash(path.relative(exportDirectory, exportedWitnessPath)),
artifactCount: artifacts.length,
};
index.runtimeWitnesses = [
...(Array.isArray(index.runtimeWitnesses) ? index.runtimeWitnesses : []).filter(candidate => candidate.witnessId !== record.witnessId),
record,
].sort((left, right) => left.witnessId.localeCompare(right.witnessId));
await writeFile(indexPath, `${JSON.stringify(index, null, 2)}\n`);
console.log(exportedWitnessPath);
function validateWitness(value) {
for (const field of ["witnessId", "runtimeId", "runtimeOwnerRepo", "providerId", "surfaceId", "projectionKind", "status", "generatedAtUtc", "authority"]) {
if (!value?.[field]) throw new Error(`Runtime witness missing ${field}.`);
}
if (value.schema !== "gamecult.eve.runtime_witness.v1") throw new Error(`Unexpected runtime witness schema: ${value.schema || ""}`);
if (!value.execution?.cacheState || !Number.isFinite(value.execution?.durationMs)) throw new Error("Runtime witness execution is incomplete.");
if (!value.assertions || typeof value.assertions !== "object") throw new Error("Runtime witness assertions are missing.");
if (value.receipts !== undefined && !Array.isArray(value.receipts)) throw new Error("Runtime witness receipts must be an array when present.");
if (!Array.isArray(value.artifacts) || !value.artifacts.length) throw new Error("Runtime witness artifacts are missing.");
for (const artifact of value.artifacts) {
if (!artifact.path || !/^[a-f0-9]{64}$/i.test(artifact.sha256 || "") || !(artifact.sizeBytes > 0)) {
throw new Error(`Runtime witness artifact is invalid: ${artifact.path || "unknown"}`);
}
}
}
function safeSegment(value) { return String(value).replace(/[^a-zA-Z0-9._-]+/g, "-"); }
function slash(value) { return value.replaceAll("\\", "/"); }
function parseJson(value) { return JSON.parse(value.replace(/^\uFEFF/, "")); }

File diff suppressed because it is too large Load diff

View file

@ -1,120 +0,0 @@
{
"schema": "gamecult.eve.conformance_handoff.v1",
"splitTarget": "EveConformance",
"ownerRepo": "EveConformance",
"currentHostRepo": "Eve",
"authorityBoundary": "EveConformance owns fixture corpus layout, conformance pack export, parity runner orchestration, consumer smokes, report artifacts, capability matrix evidence, and CI once the harness stabilizes. Eve keeps the kernel contracts, browser reference oracle, and minimal core fixtures.",
"moveSets": [
{
"id": "conformance-runner",
"destinationOwner": "EveConformance",
"currentPaths": [
"tools/parity/run-parity.mjs",
"tools/parity/parity-manifest.json",
"tools/conformance/consume-export.mjs"
],
"replacementProof": "EveConformance runs the parity/conformance harness without depending on Eve source layout."
},
{
"id": "conformance-schemas",
"destinationOwner": "EveConformance",
"currentPaths": [
"schemas/gamecult.eve.conformance_export.v1.schema.json",
"schemas/gamecult.eve.conformance_handoff.v1.schema.json",
"schemas/gamecult.eve.capability_matrix.v1.schema.json",
"schemas/gamecult.eve.conformance_fixture.v1.schema.json",
"schemas/gamecult.eve.provider_scenario.v1.schema.json",
"schemas/gamecult.eve.provider_advertisement.v1.schema.json",
"schemas/gamecult.eve.provider_handoff.v1.schema.json",
"schemas/gamecult.eve.electron_shell_projection.v1.schema.json",
"schemas/gamecult.eve.unity_scene_projection.v1.schema.json",
"schemas/gamecult.eve.unity_playable_world_asset_manifest.v1.schema.json",
"schemas/gamecult.eve.tui_grid.v1.schema.json",
"schemas/gamecult.eve.web_layout_probe.v1.schema.json",
"schemas/gamecult.eve.runtime_capability.v1.schema.json",
"schemas/gamecult.eve.runtime_lifecycle.v1.schema.json",
"schemas/gamecult.eve.runtime_split_handoff.v1.schema.json",
"schemas/gamecult.eve.command_receipt.v1.schema.json",
"schemas/gamecult.eve.plugin.v1.schema.json",
"schemas/gamecult.eve.plugin_receipt.v1.schema.json",
"schemas/gamecult.eve.plugin_advertisement.v1.schema.json",
"schemas/gamecult.eve.plugin_handoff.v1.schema.json",
"schemas/gamecult.eve.plugin_witness.v1.schema.json",
"schemas/gamecult.eve.plugin_abi_fixture.v1.schema.json",
"schemas/gamecult.eve.plugin_abi.request.v1.schema.json",
"schemas/gamecult.eve.plugin_abi.response.v1.schema.json",
"schemas/gamecult.eve.runtime_release_request.v1.schema.json",
"schemas/gamecult.eve.runtime_capture_request.v1.schema.json",
"schemas/gamecult.eve.runtime_witness.v1.schema.json"
],
"replacementProof": "EveConformance publishes the schema catalog and copied schema documents needed by conformance, plugin, provider, and runtime consumers."
},
{
"id": "consumer-smokes",
"destinationOwner": "EveConformance",
"currentPaths": [
"scripts/run-conformance-consumer-smoke.ps1",
"scripts/run-plugin-owner-conformance-consumer-smoke.ps1",
"scripts/run-runtime-owner-conformance-consumer-smoke.ps1",
"scripts/run-split-target-conformance-consumer-smoke.ps1",
"scripts/run-aetheria-conformance-consumer-smoke.ps1"
],
"replacementProof": "Runtime, plugin, provider, and split-target consumers can verify exported packs without reading Eve's parity manifest."
},
{
"id": "fixture-corpus",
"destinationOwner": "EveConformance",
"currentPaths": [
"web/fixtures/cultui-slider-inspector.conformance.json",
"web/fixtures/sai-vn-surface.conformance.json",
"web/fixtures/fensalir-direct2d-surface.conformance.json",
"web/fixtures/cultui-embedded-surface.conformance.json"
],
"replacementProof": "Core, plugin, provider, and runtime fixture metadata are exported as conformance packs with owner and exit criteria."
}
],
"contractInputs": [
"gamecult.eve.surface.v1",
"gamecult.eve.command.v1",
"gamecult.eve.command_invocation.v1",
"gamecult.eve.command_receipt.v1",
"gamecult.eve.conformance_export.v1",
"gamecult.eve.conformance_handoff.v1",
"gamecult.eve.capability_matrix.v1",
"gamecult.eve.conformance_fixture.v1",
"gamecult.eve.provider_scenario.v1",
"gamecult.eve.plugin.v1",
"gamecult.eve.plugin_receipt.v1",
"gamecult.eve.plugin_advertisement.v1",
"gamecult.eve.plugin_handoff.v1",
"gamecult.eve.plugin_witness.v1",
"gamecult.eve.plugin_abi_fixture.v1",
"gamecult.eve.plugin_abi.request.v1",
"gamecult.eve.plugin_abi.response.v1",
"gamecult.eve.runtime_release_request.v1",
"gamecult.eve.runtime_capture_request.v1",
"gamecult.eve.runtime_witness.v1",
"gamecult.eve.provider_advertisement.v1",
"gamecult.eve.provider_handoff.v1",
"gamecult.eve.electron_shell_projection.v1",
"gamecult.eve.unity_scene_projection.v1",
"gamecult.eve.unity_playable_world_asset_manifest.v1",
"gamecult.eve.tui_grid.v1",
"gamecult.eve.web_layout_probe.v1",
"gamecult.eve.runtime_capability.v1",
"gamecult.eve.runtime_lifecycle.v1",
"gamecult.eve.runtime_split_handoff.v1"
],
"forbiddenImports": [
"provider internals as conformance truth",
"runtime source layout as required consumer input",
"plugin semantic internals as Eve core authority",
"screenshot artifacts as provider state"
],
"requiredExternalProofs": [
"EveConformance publishes a consumable conformance export without depending on Eve source layout.",
"Runtime repos consume runtime targets, lifecycle evidence, and capture status from exported packs.",
"Plugin owner repos consume plugin manifests, ABI operations, capabilities, and handoff paths from exported packs.",
"Provider repos consume provider advertisements, scenarios, receipts, and handoff paths from exported packs."
]
}

View file

@ -1,36 +0,0 @@
import { mkdir, readFile, writeFile } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { compileEveDsl } from "../../web/eve-dsl.js";
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const manifest = JSON.parse(await readFile(path.join(repoRoot, "tools/parity/parity-manifest.json"), "utf8"));
const fixtureId = process.argv[2] || "cultui-inspector";
const outputPath = process.argv[3]
? path.resolve(process.argv[3])
: path.join(repoRoot, "artifacts/parity/fixtures", `${fixtureId}.surface.json`);
const fixture = manifest.fixtures.find(candidate =>
candidate.id === fixtureId || candidate.expect?.providerId === fixtureId);
if (!fixture) {
throw new Error(`Unknown parity fixture: ${fixtureId}`);
}
const surface = await loadSurface(fixture.surface);
surface.fixtureId = fixture.id;
surface.values ||= surface.mesh?.snapshot?.() || {};
delete surface.mesh;
await mkdir(path.dirname(outputPath), { recursive: true });
await writeFile(outputPath, `${JSON.stringify(surface, null, 2)}\n`);
console.log(outputPath);
async function loadSurface(surface) {
const absolutePath = path.join(repoRoot, surface.path);
const source = await readFile(absolutePath, "utf8");
if (surface.transport === "local-eve-dsl") return compileEveDsl(source);
if (surface.transport === "local-json") return JSON.parse(source);
throw new Error(`Unsupported parity surface transport: ${surface.transport}`);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -84,7 +84,7 @@
"web/eve-dsl.test.mjs",
"web/provider-advertisements.test.mjs",
"packages/eve-browser-lowering/test/browser-lowering.test.mjs",
"tools/parity/parity-manifest.json",
"../EveConformance/tools/parity/parity-manifest.json",
"scripts/run-parity-harness.ps1"
],
"pendingProofs": []