Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Move breaking ID migration to a major line

This documents the $id rewrite as breaking, but the commit applies it in-place to the existing v0.1/v1.0/v1.1 schema lines while their record schemaVersion constants remain unchanged. Any patch or minor release from these directories will make consumers keyed to the already-published IDs fail to resolve schemas even though the contract version did not move to a new major, which violates the repository versioning rule for published schemas. Keep aliases/the old IDs for existing lines, or introduce this Pages-ID migration in a new major schema line.

Useful? React with 👍 / 👎.


### Added

- Conservative automated JSON Schema compatibility classification in pull-request CI.
Expand Down
18 changes: 9 additions & 9 deletions docs/DISTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
2 changes: 1 addition & 1 deletion schemas/v0.1/artifact-manifest.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/common.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/evaluation-result.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/policy-decision.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/prompt-envelope.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/run-event.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/verification-result.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v0.1/work-request.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/artifact-manifest.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/common.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/evaluation-result.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/policy-decision.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/prompt-envelope.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/run-event.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/verification-result.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.0/work-request.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.1/common.schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.1/phase-execution-request.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.1/phase-execution-result.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.1/phase-verification-result.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.1/sdlc-lifecycle-event.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion schemas/v1.1/sdlc-profile.schema.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
Comment on lines 45 to 47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep schema evidence examples in sync

After changing the authoritative schema IDs to the Pages registry, the executable artifact-manifest fixtures still advertise https://schemas.coding-autopilot.dev/.../prompt-envelope.schema.json in examples/v0.1/artifact-manifest.json and examples/v1.0/artifact-manifest.json. Consumers copying those fixtures will keep emitting the old unresolvable namespace while schemaId() and the registry manifests now expect the github.io IDs, so the example lifecycle is no longer synchronized with the contract. Update the fixture URIs and add coverage for schema evidence URLs.

Useful? React with 👍 / 👎.


export function schemaIdForExample(examplePath) {
Expand Down
7 changes: 3 additions & 4 deletions tests/registry.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Loading