diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f5ef0..d13a39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes follow Semantic Versioning and Keep a Changelog conventions. ## [Unreleased] +### Changed + +- **BREAKING:** Schema `$id` values now point at the live GitHub Pages registry (`https://coding-autopilot-system.github.io/cas-contracts/registry/...`) instead of the unresolvable `https://schemas.coding-autopilot.dev/` namespace introduced in v1.1.1. Consumers that hardcode the old `$id` string (e.g. offline schema validators) must update to the new value. See REQ-1.4.11. + ### Added - Conservative automated JSON Schema compatibility classification in pull-request CI. diff --git a/docs/DISTRIBUTION.md b/docs/DISTRIBUTION.md index 3e321d0..7f86fc7 100644 --- a/docs/DISTRIBUTION.md +++ b/docs/DISTRIBUTION.md @@ -7,11 +7,9 @@ sub-path of the documentation site on a single GitHub Pages origin: https://coding-autopilot-system.github.io/cas-contracts/registry/ ``` -Schema `$id` values use the reserved canonical namespace -`https://schemas.coding-autopilot.dev/`. That namespace is the stable identity -of each schema even though the current live distribution is served from GitHub -Pages. Consumers should treat `$id` as identity and use the Pages registry URLs -below as the fetch location until the canonical domain is activated. +Schema `$id` values are now identical to the live fetch URL under the GitHub +Pages registry — there is no separate canonical namespace. `$id` is both the +identity and the resolvable fetch location for every schema. ## URL Contract @@ -67,7 +65,9 @@ immutable manifest and the stable-line index before declaring the release done. ## Custom domain (optional future work) -When `schemas.coding-autopilot.dev` is activated, it must serve the same -versioned registry content without changing any schema `$id` values. The live -GitHub Pages registry remains the current distribution URL and should stay -stable for consumers that fetch schemas directly today. +If `schemas.coding-autopilot.dev` is ever activated as a custom domain, that +will require a new, explicit `$id` migration with its own consumer-compatibility +plan — it is not a transparent, zero-cost activation. `$id` currently equals +the live GitHub Pages fetch URL, so repointing `$id` to a future custom domain +would be a breaking change for any consumer that has adopted the current +`$id` value, and must be planned and announced accordingly. diff --git a/schemas/v0.1/artifact-manifest.schema.json b/schemas/v0.1/artifact-manifest.schema.json index af27f47..feb4869 100644 --- a/schemas/v0.1/artifact-manifest.schema.json +++ b/schemas/v0.1/artifact-manifest.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/artifact-manifest.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/artifact-manifest.schema.json", "title": "ArtifactManifest", "type": "object", "allOf": [ diff --git a/schemas/v0.1/common.schema.json b/schemas/v0.1/common.schema.json index 0eec265..410c751 100644 --- a/schemas/v0.1/common.schema.json +++ b/schemas/v0.1/common.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/common.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/common.schema.json", "title": "CAS Common Definitions", "$defs": { "actor": { diff --git a/schemas/v0.1/evaluation-result.schema.json b/schemas/v0.1/evaluation-result.schema.json index 719f46a..9e753b2 100644 --- a/schemas/v0.1/evaluation-result.schema.json +++ b/schemas/v0.1/evaluation-result.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/evaluation-result.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/evaluation-result.schema.json", "title": "EvaluationResult", "type": "object", "allOf": [ diff --git a/schemas/v0.1/policy-decision.schema.json b/schemas/v0.1/policy-decision.schema.json index 411482f..d0872aa 100644 --- a/schemas/v0.1/policy-decision.schema.json +++ b/schemas/v0.1/policy-decision.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/policy-decision.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/policy-decision.schema.json", "title": "PolicyDecision", "type": "object", "allOf": [ diff --git a/schemas/v0.1/prompt-envelope.schema.json b/schemas/v0.1/prompt-envelope.schema.json index 24a6e2d..306d999 100644 --- a/schemas/v0.1/prompt-envelope.schema.json +++ b/schemas/v0.1/prompt-envelope.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/prompt-envelope.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/prompt-envelope.schema.json", "title": "PromptEnvelope", "type": "object", "allOf": [ diff --git a/schemas/v0.1/run-event.schema.json b/schemas/v0.1/run-event.schema.json index 3f89d28..8ef4d11 100644 --- a/schemas/v0.1/run-event.schema.json +++ b/schemas/v0.1/run-event.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/run-event.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/run-event.schema.json", "title": "RunEvent", "type": "object", "allOf": [ diff --git a/schemas/v0.1/verification-result.schema.json b/schemas/v0.1/verification-result.schema.json index 67719cc..c0d3ef0 100644 --- a/schemas/v0.1/verification-result.schema.json +++ b/schemas/v0.1/verification-result.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/verification-result.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/verification-result.schema.json", "title": "VerificationResult", "type": "object", "allOf": [ diff --git a/schemas/v0.1/work-request.schema.json b/schemas/v0.1/work-request.schema.json index 367cca8..8aa3916 100644 --- a/schemas/v0.1/work-request.schema.json +++ b/schemas/v0.1/work-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v0.1/work-request.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/work-request.schema.json", "title": "WorkRequest", "type": "object", "allOf": [ diff --git a/schemas/v1.0/artifact-manifest.schema.json b/schemas/v1.0/artifact-manifest.schema.json index 9473d89..224a0cd 100644 --- a/schemas/v1.0/artifact-manifest.schema.json +++ b/schemas/v1.0/artifact-manifest.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/artifact-manifest.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/artifact-manifest.schema.json", "title": "ArtifactManifest", "type": "object", "allOf": [ diff --git a/schemas/v1.0/common.schema.json b/schemas/v1.0/common.schema.json index 3563af9..8a6a101 100644 --- a/schemas/v1.0/common.schema.json +++ b/schemas/v1.0/common.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/common.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/common.schema.json", "title": "CAS Common Definitions", "$defs": { "actor": { diff --git a/schemas/v1.0/evaluation-result.schema.json b/schemas/v1.0/evaluation-result.schema.json index fa6c93c..4478e8e 100644 --- a/schemas/v1.0/evaluation-result.schema.json +++ b/schemas/v1.0/evaluation-result.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/evaluation-result.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/evaluation-result.schema.json", "title": "EvaluationResult", "type": "object", "allOf": [ diff --git a/schemas/v1.0/policy-decision.schema.json b/schemas/v1.0/policy-decision.schema.json index 10c8628..9c9d8ae 100644 --- a/schemas/v1.0/policy-decision.schema.json +++ b/schemas/v1.0/policy-decision.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/policy-decision.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/policy-decision.schema.json", "title": "PolicyDecision", "type": "object", "allOf": [ diff --git a/schemas/v1.0/prompt-envelope.schema.json b/schemas/v1.0/prompt-envelope.schema.json index 576b9a2..064484d 100644 --- a/schemas/v1.0/prompt-envelope.schema.json +++ b/schemas/v1.0/prompt-envelope.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/prompt-envelope.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/prompt-envelope.schema.json", "title": "PromptEnvelope", "type": "object", "allOf": [ diff --git a/schemas/v1.0/run-event.schema.json b/schemas/v1.0/run-event.schema.json index ff1c7fa..4c78511 100644 --- a/schemas/v1.0/run-event.schema.json +++ b/schemas/v1.0/run-event.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/run-event.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/run-event.schema.json", "title": "RunEvent", "type": "object", "allOf": [ diff --git a/schemas/v1.0/verification-result.schema.json b/schemas/v1.0/verification-result.schema.json index 5defd72..06780ea 100644 --- a/schemas/v1.0/verification-result.schema.json +++ b/schemas/v1.0/verification-result.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/verification-result.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/verification-result.schema.json", "title": "VerificationResult", "type": "object", "allOf": [ diff --git a/schemas/v1.0/work-request.schema.json b/schemas/v1.0/work-request.schema.json index 7f72c64..a9f485d 100644 --- a/schemas/v1.0/work-request.schema.json +++ b/schemas/v1.0/work-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.0/work-request.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/work-request.schema.json", "title": "WorkRequest", "type": "object", "allOf": [ diff --git a/schemas/v1.1/common.schema.json b/schemas/v1.1/common.schema.json index b23a790..bfc3eaf 100644 --- a/schemas/v1.1/common.schema.json +++ b/schemas/v1.1/common.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.1/common.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.1/common.schema.json", "title": "CAS Common Definitions v1.1", "$defs": { "actor": { diff --git a/schemas/v1.1/phase-execution-request.schema.json b/schemas/v1.1/phase-execution-request.schema.json index e7ad5a8..9b9f58b 100644 --- a/schemas/v1.1/phase-execution-request.schema.json +++ b/schemas/v1.1/phase-execution-request.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.1/phase-execution-request.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.1/phase-execution-request.schema.json", "title": "PhaseExecutionRequest", "type": "object", "allOf": [ diff --git a/schemas/v1.1/phase-execution-result.schema.json b/schemas/v1.1/phase-execution-result.schema.json index 5aa2623..971820b 100644 --- a/schemas/v1.1/phase-execution-result.schema.json +++ b/schemas/v1.1/phase-execution-result.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.1/phase-execution-result.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.1/phase-execution-result.schema.json", "title": "PhaseExecutionResult", "type": "object", "allOf": [ diff --git a/schemas/v1.1/phase-verification-result.schema.json b/schemas/v1.1/phase-verification-result.schema.json index 083d947..66b03f5 100644 --- a/schemas/v1.1/phase-verification-result.schema.json +++ b/schemas/v1.1/phase-verification-result.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.1/phase-verification-result.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.1/phase-verification-result.schema.json", "title": "PhaseVerificationResult", "type": "object", "allOf": [ diff --git a/schemas/v1.1/sdlc-lifecycle-event.schema.json b/schemas/v1.1/sdlc-lifecycle-event.schema.json index b062c81..312dfa1 100644 --- a/schemas/v1.1/sdlc-lifecycle-event.schema.json +++ b/schemas/v1.1/sdlc-lifecycle-event.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.1/sdlc-lifecycle-event.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.1/sdlc-lifecycle-event.schema.json", "title": "SdlcLifecycleEvent", "type": "object", "allOf": [ diff --git a/schemas/v1.1/sdlc-profile.schema.json b/schemas/v1.1/sdlc-profile.schema.json index d9dbd62..9e336e7 100644 --- a/schemas/v1.1/sdlc-profile.schema.json +++ b/schemas/v1.1/sdlc-profile.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://schemas.coding-autopilot.dev/v1.1/sdlc-profile.schema.json", + "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.1/sdlc-profile.schema.json", "title": "SdlcProfile", "type": "object", "allOf": [ diff --git a/scripts/lib.mjs b/scripts/lib.mjs index 6f67776..8f600c6 100644 --- a/scripts/lib.mjs +++ b/scripts/lib.mjs @@ -43,7 +43,7 @@ export async function createValidator(directory = schemaRoot) { } export function schemaId(version, name) { - return `${canonicalSchemaBase}/${version}/${name}.schema.json`; + return `${pagesRegistryBase}/${version}/${name}.schema.json`; } export function schemaIdForExample(examplePath) { diff --git a/tests/registry.test.mjs b/tests/registry.test.mjs index 7b9abb2..ad6fc40 100644 --- a/tests/registry.test.mjs +++ b/tests/registry.test.mjs @@ -41,14 +41,13 @@ test("distributed stable schemas compile and retain authoritative ids", async () } }); -test("registry keeps canonical schema identity independent from the Pages hosting URL", async () => { +test("registry schema identity resolves under the live Pages registry URL", async () => { const output = await build(); const manifest = await readJson(path.join(output, "v0.1", "manifest.json")); for (const entry of manifest.schemas) { - assert.match(entry.id, /^https:\/\/schemas\.coding-autopilot\.dev\//); - assert.doesNotMatch(entry.id, /github\.io/); - assert.notEqual(entry.id, `https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/${entry.path}`); + assert.match(entry.id, /^https:\/\/coding-autopilot-system\.github\.io\/cas-contracts\/registry\//); + assert.equal(entry.id, `https://coding-autopilot-system.github.io/cas-contracts/registry/v0.1/${entry.path}`); } const promptEnvelope = manifest.schemas.find((entry) => entry.path === "prompt-envelope.schema.json");