Skip to content

fix(registry): rewrite schema $id to the resolvable Pages registry URL#18

Merged
OgeonX-Ai merged 2 commits into
mainfrom
fix/registry-resolvable-id
Jul 8, 2026
Merged

fix(registry): rewrite schema $id to the resolvable Pages registry URL#18
OgeonX-Ai merged 2 commits into
mainfrom
fix/registry-resolvable-id

Conversation

@OgeonX-Ai

Copy link
Copy Markdown
Contributor

Summary

Fixes REQ-1.4.11: rewrites every schema $id from the unresolvable https://schemas.coding-autopilot.dev/ namespace to the live, already-working GitHub Pages registry URL (https://coding-autopilot-system.github.io/cas-contracts/registry/...).

Diagnosis

  • gh api repos/Coding-Autopilot-System/cas-contracts/pages confirms cname: null — no custom domain is configured for this repository.
  • curl https://schemas.coding-autopilot.dev/v0.1/common.schema.json fails to connect (curl exit code 000).
  • curl https://coding-autopilot-system.github.io/cas-contracts/registry/index.json returns 200 today — pages.yml (the unified docs+registry publisher) already works correctly.

The only remaining gap was that $id named an address that doesn't resolve. This PR repoints $id to the address that actually works.

What changed

  • All 22 schema $id values (schemas/{v0.1,v1.0,v1.1}/*.schema.json) rewritten from https://schemas.coding-autopilot.dev/{version}/{name}.schema.json to https://coding-autopilot-system.github.io/cas-contracts/registry/{version}/{name}.schema.json. Only the host+path prefix changed; each file's existing key/value whitespace style was preserved.
  • scripts/lib.mjs: schemaId() now builds from pagesRegistryBase instead of canonicalSchemaBase. canonicalSchemaBase remains exported (still used by build-registry.mjs's --domain CNAME option) but is no longer used for identity.
  • tests/registry.test.mjs: replaced the "registry keeps canonical schema identity independent from the Pages hosting URL" test (which asserted $id must NOT match the github.io URL) with "registry schema identity resolves under the live Pages registry URL", asserting the inverse — every manifest entry's id matches and equals the Pages registry URL for its path.
  • docs/DISTRIBUTION.md: removed the "reserved canonical namespace" language and the claim that a future custom-domain activation would be transparent/zero-cost. Documents that $id is now identical to the live fetch URL, and that activating schemas.coding-autopilot.dev in the future would require an explicit $id migration with its own consumer-compatibility plan.
  • CHANGELOG.md: added a ### Changed entry under [Unreleased] marked BREAKING, explaining the reversal and pointing consumers at REQ-1.4.11.

Superseding prior art

v1.1.1 (commit 0b35b98, "fix(registry): restore canonical schema identity") deliberately set $id to schemas.coding-autopilot.dev and added a regression test specifically to prevent $id from ever matching the github.io URL. That decision assumed a custom domain would be activated later. It has not been, REQ-1.4.11 requires resolvability now, and the live pages API check proves no DNS/custom-domain work is in flight. This PR supersedes that decision — the CHANGELOG and DISTRIBUTION.md updates say so explicitly so this isn't reverted a third time.

Note on fix/pages-release-ordering

PR #16 (fix/pages-release-ordering, "docs(release): define Pages publication ordering") is already merged to main (docs-only change, a release-ordering runbook note in DISTRIBUTION.md). It needs no cherry-pick and is unrelated to this change.

Breaking change for consumers

Consumers that hardcode the old $id string (e.g. offline schema validators) must update to the new value. This is addressed for cas-evals in a companion PR (see plan 32-02).

Test plan

  • npm ci && node --test tests/contracts.test.mjs tests/goal-contract.test.mjs passes
  • npm test (full suite, all 4 test files) passes — 36/36
  • npm run build:registry -- --all && npm run validate:registry -- --registry registry passes
  • Zero remaining schemas.coding-autopilot.dev references across all 22 schema files (grep -L count == 22)
  • Post-merge (deferred, see plan 32-02): live-fetch a schema URL from the deployed Pages registry and confirm its $id field reads the new github.io value

Not merging this PR per environment constraint — PR-only, leaving open for review.

Aitomates added 2 commits July 6, 2026 20:09
- Rewrite all 22 schema $id values from the unresolvable
  https://schemas.coding-autopilot.dev/ namespace to the live
  https://coding-autopilot-system.github.io/cas-contracts/registry/ URL
- Update schemaId() in lib.mjs to build from pagesRegistryBase instead of
  canonicalSchemaBase (canonicalSchemaBase stays exported, unused by
  schemaId(), for the --domain CNAME option)
- REQ-1.4.11
- Replace the anti-pattern test asserting $id must NOT match the Pages
  hosting URL with a regression test asserting $id DOES resolve under it
- Update DISTRIBUTION.md to state $id equals the live fetch URL; document
  that activating schemas.coding-autopilot.dev in future would require an
  explicit $id migration, not a transparent zero-cost activation
- Add BREAKING CHANGELOG entry under [Unreleased] documenting the reversal
  of v1.1.1's canonical-namespace decision
- REQ-1.4.11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f7f3deac9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md

### 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 👍 / 👎.

Comment thread scripts/lib.mjs
Comment on lines 45 to 47
export function schemaId(version, name) {
return `${canonicalSchemaBase}/${version}/${name}.schema.json`;
return `${pagesRegistryBase}/${version}/${name}.schema.json`;
}

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 👍 / 👎.

@OgeonX-Ai OgeonX-Ai enabled auto-merge (squash) July 8, 2026 17:03
@OgeonX-Ai OgeonX-Ai added the compatibility-reviewed Intentional review-required schema changes accepted label Jul 8, 2026
@OgeonX-Ai OgeonX-Ai merged commit b385f15 into main Jul 8, 2026
6 of 7 checks passed
@OgeonX-Ai OgeonX-Ai deleted the fix/registry-resolvable-id branch July 8, 2026 17:52
OgeonX-Ai added a commit that referenced this pull request Jul 8, 2026
* docs(36-02): fix registry $id framing and append freshness footer

- Clarify Pages registry is authoritative now; schemas.coding-autopilot.dev
  migration is in progress (PR #18), not settled fact
- Append docs-verified freshness footer

* docs(36-03): add docs/wiki tree (Home, Architecture, Operations, Decisions)

- Architecture.md documents the schema-versioning + Pages registry
  publishing pipeline, and the in-progress $id migration (PR #18)
- Operations.md verified test/validate/build-registry/CI commands
- Decisions.md indexes phase history and open PRs

---------

Co-authored-by: Kim Harjamäki <kim.harjamaki@prosimo.fi>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility-reviewed Intentional review-required schema changes accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants