Export conformance schema catalog
This commit is contained in:
parent
227c6bd59d
commit
2437181caf
6 changed files with 90 additions and 0 deletions
|
|
@ -825,6 +825,11 @@ Recently cut:
|
|||
TeX ABI fixtures must name those same schemas, and parity fails if a sidecar
|
||||
advertises a request/response schema that is missing from the contract
|
||||
catalog.
|
||||
- Conformance export now carries a root `schemaCatalog` and copies schema
|
||||
documents under `schemas/` in the export. Plugin owners can assert
|
||||
`gamecult.eve.plugin_abi.request.v1` and
|
||||
`gamecult.eve.plugin_abi.response.v1` from the exported pack instead of
|
||||
reading Eve's parity manifest to discover contract paths.
|
||||
- Split-readiness reporting now exists for `EveFlutter` and `EveUnity`. The
|
||||
parity report lists member runtime health, required plugin capability claims,
|
||||
pending proofs, and blockers before either repo can graduate out of Eve
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
"plugins",
|
||||
"providers",
|
||||
"runtimes",
|
||||
"schemaCatalog",
|
||||
"pluginAbiOperationCoverage",
|
||||
"providerPluginRequirementCoverage",
|
||||
"runtimePluginProjectionCoverage",
|
||||
|
|
@ -104,6 +105,32 @@
|
|||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"schemaCatalog": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaId",
|
||||
"path",
|
||||
"exportPath"
|
||||
],
|
||||
"properties": {
|
||||
"schemaId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"exportPath": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"runtimePluginProjectionGaps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ Push-Location $projectRoot
|
|||
try {
|
||||
node .\tools\conformance\consume-export.mjs $consumerExport `
|
||||
--expect-capability-matrix `
|
||||
--expect-schema gamecult.eve.conformance_export.v1 `
|
||||
--expect-schema gamecult.eve.plugin_abi.request.v1 `
|
||||
--expect-schema gamecult.eve.plugin_abi.response.v1 `
|
||||
--expect-capability-gap runtime:Fensalir:direct2d:capture:missing `
|
||||
--expect-world-lowering-coverage aetheria:aetheria.daemon.game:web-reference:claimed:Eve:web `
|
||||
--expect-world-lowering-coverage aetheria:aetheria.daemon.game:unity-uitoolkit:claimed:EveUnity:unity-uitoolkit `
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@ $consumerScript = Join-Path $projectRoot "tools\conformance\consume-export.mjs"
|
|||
|
||||
node $consumerScript $consumerExport `
|
||||
--expect-pack plugin `
|
||||
--expect-schema gamecult.eve.plugin.v1 `
|
||||
--expect-schema gamecult.eve.plugin_advertisement.v1 `
|
||||
--expect-schema gamecult.eve.plugin_abi_fixture.v1 `
|
||||
--expect-schema gamecult.eve.plugin_abi.request.v1 `
|
||||
--expect-schema gamecult.eve.plugin_abi.response.v1 `
|
||||
--expect-fixture sai-vn `
|
||||
--expect-plugin sai.vn `
|
||||
--expect-plugin norn.graph `
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ if (!exportDirectory) {
|
|||
" --expect-scenario <id>",
|
||||
" --expect-split-target <id>",
|
||||
" --expect-capability-matrix",
|
||||
" --expect-schema <schemaId>",
|
||||
" --expect-capability-gap <substring>",
|
||||
" --expect-runtime-plugin-projection <runtimeId:pluginId:status:ownerRepo>",
|
||||
" --expect-provider-runtime-plugin-projection <providerId:surfaceId:runtimeId:pluginId:status:runtimeOwnerRepo>",
|
||||
|
|
@ -85,6 +86,7 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
const packIds = new Set(packs.map(pack => pack.id));
|
||||
const fixtureIds = new Set();
|
||||
const exportedRuntimeTargets = [];
|
||||
validateSchemaCatalog(index.schemaCatalog, directory, expectations.schemas, errors);
|
||||
for (const requiredPack of ["core", "plugin", "provider", "runtime"]) {
|
||||
if (!packIds.has(requiredPack)) errors.push(`pack:${requiredPack}:missing`);
|
||||
}
|
||||
|
|
@ -990,6 +992,32 @@ function validateSplitTargetRecords(splitTargets, errors) {
|
|||
}
|
||||
}
|
||||
|
||||
function validateSchemaCatalog(schemaCatalog, directory, expectedSchemas, errors) {
|
||||
if (!Array.isArray(schemaCatalog)) {
|
||||
errors.push("schemaCatalog:missing");
|
||||
return;
|
||||
}
|
||||
for (const [index, schema] of schemaCatalog.entries()) {
|
||||
const label = `schemaCatalog:${index}`;
|
||||
for (const field of ["schemaId", "path", "exportPath"]) {
|
||||
if (!schema?.[field]) errors.push(`${label}:${field}:missing`);
|
||||
}
|
||||
if (schema?.exportPath && !existsSync(path.join(directory, schema.exportPath))) {
|
||||
errors.push(`${label}:exportPath:${schema.exportPath}:missing`);
|
||||
}
|
||||
}
|
||||
for (const schemaId of expectedSchemas) {
|
||||
const schema = schemaCatalog.find(candidate => candidate.schemaId === schemaId);
|
||||
if (!schema) {
|
||||
errors.push(`schemaCatalog:${schemaId}:missing`);
|
||||
continue;
|
||||
}
|
||||
if (!schema.exportPath || !existsSync(path.join(directory, schema.exportPath))) {
|
||||
errors.push(`schemaCatalog:${schemaId}:exportPath:missing`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function capabilityGapText(gap) {
|
||||
return [
|
||||
gap.kind,
|
||||
|
|
@ -1005,6 +1033,7 @@ function parseArguments(args) {
|
|||
const exportPath = args[0] ? path.resolve(args[0]) : "";
|
||||
const expectations = {
|
||||
packs: [],
|
||||
schemas: [],
|
||||
fixtures: [],
|
||||
plugins: [],
|
||||
pluginOperations: [],
|
||||
|
|
@ -1055,6 +1084,7 @@ function parseArguments(args) {
|
|||
};
|
||||
const optionTargets = new Map([
|
||||
["--expect-pack", expectations.packs],
|
||||
["--expect-schema", expectations.schemas],
|
||||
["--expect-fixture", expectations.fixtures],
|
||||
["--expect-plugin", expectations.plugins],
|
||||
["--expect-provider", expectations.providers],
|
||||
|
|
|
|||
|
|
@ -1728,6 +1728,7 @@ function buildConformanceExport(report) {
|
|||
sourceManifest: report.manifest,
|
||||
boundaryRule: report.repoStrategy.boundaryRule || "",
|
||||
incubationPolicy: report.repoStrategy.incubationPolicy || "",
|
||||
schemaCatalog: buildSchemaCatalog(),
|
||||
conformanceHandoffPath: report.repoStrategy.conformanceHandoffPath || "",
|
||||
conformanceHandoffExportPath: makeHandoffExportPath("conformance", "EveConformance", report.repoStrategy.conformanceHandoffPath || ""),
|
||||
packs,
|
||||
|
|
@ -1798,6 +1799,16 @@ function buildConformanceExport(report) {
|
|||
};
|
||||
}
|
||||
|
||||
function buildSchemaCatalog() {
|
||||
return Object.entries(manifest.schemas || {})
|
||||
.map(([schemaId, schemaPath]) => ({
|
||||
schemaId,
|
||||
path: schemaPath,
|
||||
exportPath: `schemas/${path.basename(schemaPath)}`,
|
||||
}))
|
||||
.sort((left, right) => left.schemaId.localeCompare(right.schemaId));
|
||||
}
|
||||
|
||||
function buildCapabilityMatrix(report) {
|
||||
const packs = (report.conformancePacks || []).map(pack => {
|
||||
const fixtures = (report.fixtures || []).filter(fixture => fixture.pack === pack.id);
|
||||
|
|
@ -2422,11 +2433,20 @@ function buildWorldSurfaceLoweringTargetIndex(report) {
|
|||
async function writeConformanceExport(conformanceExport, directory) {
|
||||
await mkdir(path.join(directory, "packs"), { recursive: true });
|
||||
await mkdir(path.join(directory, "handoffs"), { recursive: true });
|
||||
await mkdir(path.join(directory, "schemas"), { recursive: true });
|
||||
await writeFile(path.join(directory, "index.json"), `${JSON.stringify(conformanceExport, null, 2)}\n`);
|
||||
await writeFile(path.join(directory, "index.md"), renderConformanceExportMarkdown(conformanceExport));
|
||||
for (const pack of conformanceExport.packs) {
|
||||
await writeFile(path.join(directory, "packs", `${pack.id}.json`), `${JSON.stringify(pack, null, 2)}\n`);
|
||||
}
|
||||
for (const schema of conformanceExport.schemaCatalog || []) {
|
||||
if (!schema.path || !schema.exportPath) continue;
|
||||
const sourcePath = path.join(repoRoot, schema.path);
|
||||
if (!existsSync(sourcePath)) continue;
|
||||
const destinationPath = path.join(directory, schema.exportPath);
|
||||
await mkdir(path.dirname(destinationPath), { recursive: true });
|
||||
await writeFile(destinationPath, await readFile(sourcePath, "utf8"));
|
||||
}
|
||||
for (const handoff of collectConformanceHandoffs(conformanceExport)) {
|
||||
if (!handoff.sourcePath || !handoff.exportPath) continue;
|
||||
const sourcePath = path.join(repoRoot, handoff.sourcePath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue