fix(registry): restore canonical schema identity#15
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e7a860085
ℹ️ 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".
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://coding-autopilot-system.github.io/cas-contracts/registry/v1.0/prompt-envelope.schema.json", | ||
| "$id": "https://schemas.coding-autopilot.dev/v1.0/prompt-envelope.schema.json", |
There was a problem hiding this comment.
Keep hosted schemas dereferenceable from Pages
When a consumer fetches this schema from the documented live Pages URL, the relative $ref below resolves against this new canonical $id, so common.schema.json#... becomes https://schemas.coding-autopilot.dev/v1.0/common.schema.json#... instead of the Pages registry copy. docs/DISTRIBUTION.md says that canonical domain is not activated yet and consumers should use the Pages registry as the fetch location, so validators that load a single hosted schema and resolve remote refs will fail to fetch shared definitions unless they pre-bundle every schema by canonical id.
Useful? React with 👍 / 👎.
Summary
$idvalues tohttps://schemas.coding-autopilot.dev/across all published schema linesregistry/URLs as the live distribution endpointRoot cause
A prior fix migrated schema identity from the stable canonical namespace to the GitHub Pages hosting URL. That coupled schema identity to distribution location and regressed the public contract.
Validation
npm testnpm run validatenpm run build:registry -- --allnpm run validate:registry -- --registry registry