Clarify extra namespace guidance - #56
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refines the CTRF specification’s guidance around the extra extension mechanism, focusing on namespaced extension keys, opaque semantics, and consumer behavior when encountering unknown extension content. It also updates the comprehensive example JSON so it matches the new guidance and records the change in the changelog.
Changes:
- Reworked spec section 4.6 into clearer subsections for extension keys, values, and semantics, with explicit ignore/forward-compat rules for
extra. - Updated
spec/ctrf.mdexamples andexamples/comprehensive.jsonto demonstrate grouped, namespaced extension objects (e.g.,myorg.ci). - Added a changelog entry describing the clarified namespace guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| spec/ctrf.md | Rewrites the extension mechanism guidance and updates/adds examples for namespaced extra usage. |
| examples/comprehensive.json | Updates the comprehensive example to use grouped, namespaced extra extension keys. |
| CHANGELOG.md | Notes the spec/example clarification in the Unreleased changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ma11hewThomas
marked this pull request as ready for review
July 26, 2026 15:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clarifies the CTRF extension mechanism for
extraobjects so producers can add tool-specific, vendor-specific, or domain-specific metadata without creating collisions or fragmenting the core format.This PR keeps CTRF strict outside defined extension points while making the intended shape of extension data clearer inside
extra.What Changed
4.6into clearer subsections for extension keys, extension values, and extension semantics.extraare the only supported extensibility points in CTRF.extraobject and MUST NOT reject otherwise valid documents solely because those fields are present..or/ctrf.*namespace for CTRF-defined extensions.extraobjects in a single document.myorg.ciandacme.test-management.examples/comprehensive.jsonso the standalone comprehensive example matches the spec guidance.Why
CTRF already supports
extra, but the previous guidance did not say enough about how extension keys should be named or structured. Without clearer guidance, producers could create incompatible shapes for similar metadata, consumers could treat extension content inconsistently, and theextramechanism could become difficult to reason about as adoption grows.The intent is to preserve a small, stable core schema while giving producers a predictable extension pattern:
extrafor extension datactrf.*for extensions defined by CTRF itselfExamples
Preferred grouped extension shape:
{ "extra": { "microsoft.azure-devops": { "pipelineId": "42", "runId": "10891", "stageName": "test" } } }This avoids spreading related fields across many flat keys and makes ownership clearer for consumers that choose to understand a specific extension.
Impact
This is a documentation and example clarification. It does not change the JSON Schema and does not add required fields.
Expected impact:
extracontent must be ignored within the extension mechanism.extrawhile allowing safe extension insideextra.Validation
jsonschema validate schema/ctrf.schema.json examples/*.jsonjsonschema test tests/ctrf.test.jsonjsonschema test tests/normativejsonschema test tests/informative