-
-
Notifications
You must be signed in to change notification settings - Fork 315
Add PROCESS.md documenting the new SDLC #1348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
# JSON Schema Specification Development Process | ||
This document formally defines the process used to evolve the JSON Schema | ||
specification as of the first stable release in 2023. It applies to the core | ||
specification and the specifications for any dialects and vocabularies | ||
maintained by the JSON Schema Org, but it doesn't necessarily apply to | ||
everything the JSON Schema Org maintains. For example, media type registration | ||
follows the IETF process. Certain components used within JSON Schema, such as | ||
Relative JSON Pointer, may also follow a separate process. | ||
|
||
This process doesn't apply to third-party dialects, vocabularies, or other | ||
extensions. However, third-parties are welcome to use this as a basis for the | ||
process they use for their specifications. | ||
|
||
## Canonical URLs | ||
There MUST be a stable canonical URL for referencing any specification that | ||
follows this process. If the spec is made available from any other URLs, they | ||
SHOULD redirect to the canonical URL. If the canonical URL is changed in the | ||
future, all previous canonical URLs MUST remain accessible as redirects to the | ||
current URL. | ||
|
||
## Mutable Spec | ||
There is only one version of the specification and it can be updated at any time | ||
as long as those changes don't violate the compatibility rules identified by the | ||
stability model. Bug fixes, clarifications, and other non-functional spec | ||
updates can be merged at any time even for stable features. A change-log blog | ||
post SHOULD be prepared quarterly to give visibility to any changes that were | ||
merged in the last quarter. | ||
|
||
## The Stability Model | ||
Every feature in the spec has a release status. It's either evolving, stable, or | ||
deprecated. Flags are used to show the status a feature is in. If it has a year | ||
flag (such as `2024`) that's the year the feature reached stability. The other | ||
flags indicate a feature that is not yet stable or is deprecated. | ||
|
||
If a feature doesn't have a flag, it's considered stable. A feature can only be | ||
unflagged if it was stable in the initial stable release in 2023. Any functional | ||
change to the spec after the initial stable release MUST have a flag indicating | ||
it's status. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Under what situation would a feature have no flag? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You quoted the answer immediately before asking the question, so I'm not sure how to answer.
I can expand on that if it's not clear enough, but I'm not sure what's not clear. Does this discussion with @gregsdennis help? #1348 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I mistook "unflagged" for "deflagged". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. I'll try to reword to avoid that misunderstanding. Removing or changing flags isn't disallowed, but compatibility rules apply. So, you couldn't remove a stable flag (such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here's an example of the kind of thing I have in mind from the node.js docs https://nodejs.org/dist/latest-v19.x/docs/api/fs.html. They have stable, unstable, and deprecated features and flag them inline just like we're talking about here. |
||
|
||
### Champions | ||
Any feature that is evolving SHOULD have a champion. The champion is responsible | ||
for shepherding the feature through the process to into stable status. The | ||
champion doesn't need to do all the work, they're just responsible for making | ||
sure the work gets done. The champion role MAY be shared by more than one | ||
person. An evolving feature without a champion SHOULD be removed from the spec. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to see that first requirement as a MUST. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I fully expect champions to disappear on occasion. In that case, a new champion would be named or the feature would be abandoned and removed. The "SHOULD" is to give us some leeway if for some reason we can't or don't want to assign a champion right away, but also don't want to remove the feature. It's not a likely scenario. I'm fine with calling it a MUST if we want to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather call it a MUST. As for remaining in the spec, I think that would need to be a case by case basis. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If having a champion is a MUST, that means if a feature loses its champion for some reason, our only choices are to assign a new champion or remove it from the spec. If we don't remove it from the spec, then we are in violation of the MUST. If you want spec removal to be on a case-by-case basis rather than a MUST remove, we need to go with "SHOULD" to give us that option. |
||
|
||
### Proposals | ||
New features start out as proposals. Proposals are informal GitHub Issues or | ||
Discussions and can be submitted by anyone. | ||
|
||
All proposals MUST be backward compatible with the current stable specification. | ||
Features that could be problematic for forward compatibility are highly | ||
discouraged, but may be considered if the feature is optional and disabled by | ||
default. | ||
|
||
**Promotion to STAGE-0 Checklist:** | ||
[] Consensus among JSON Schema Org core contributors that the proposal is worth | ||
pursuing | ||
[] The proposal has a champion | ||
[] A PR for an entry in the `STAGE-0` registry has been approved | ||
|
||
### STAGE-0 | ||
`STAGE-0` features are tracked in the `STAGE-0` Registry on the website. This | ||
registry lists all `STAGE-0` features. Each entry SHOULD include the following | ||
checklist as well as an informal description with at least one example and any | ||
relevant links. | ||
|
||
This stage requires at least two implementations to implement the feature. The | ||
purpose of these implementations is to identify any potential implementation | ||
issues that might lead to low adoption such as difficulty of implementation or | ||
performance implications. Therefore, these implementations don't need to be | ||
publicly available or have real world use at this point. | ||
|
||
**Promotion to STAGE-1 Checklist:** | ||
[] There is general consensus among the core contributors for adding the feature | ||
to the spec | ||
[] Tests are available in the test suite | ||
[] Two implementations have implemented the feature and pass the tests suite | ||
[] A blog post has been published introducing the feature | ||
[] A PR for the spec has been approved that completely specifies the feature and | ||
removes the feature from the `STAGE-0` registry. | ||
|
||
### STAGE-1 | ||
`STAGE-1` features are included in the specification, but flagged as `STAGE-1` | ||
and are not subject to the compatibility requirements of "stable" features. They | ||
can be added at any time as long as it meets all criteria for `STAGE-1` status. | ||
|
||
At this stage, the feature should be seeing real world use. These features MAY | ||
gregsdennis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
change or be removed all together based on what we learn from real world usage, | ||
but anything more than small changes should be extremely rare. Any necessary | ||
feature experimentation and evolution should have been done in `STAGE-0`. | ||
|
||
Implementers are encouraged to implement `STAGE-1` features, but are not | ||
expected to maintain support for previous versions if they change. Users who | ||
choose to use these features should be prepared for the possibility of changes | ||
and be willing to update their schemas if a change does occur. | ||
|
||
A `STAGE-1` feature can be promoted to `STAGE-2` at any time. Ideally a | ||
feature should stay in `STAGE-1` for about one year, but may stay longer if we | ||
don't see it used enough in the wild. | ||
|
||
**Promotion to STAGE-2 Checklist:** | ||
[] There is general consensus that the feature has been proven to be a good | ||
addition to JSON Schema and is unlikely to change. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Determined by whom? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whoever the JSON Schema Org active contributors happen to be at the time. Maybe at some point that will be a specific and official group of people like a TSC, but for now it's squishy concept. For now I'll make the text more specific. We can update the wording when/if we have an official group we can name. |
||
[] We see the feature being used successfully in the wild and not generating a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See, #1348 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, then that needs to be defined. |
||
lot of community support issues that could indicate a problem. | ||
|
||
### STAGE-2 | ||
`STAGE-2` features are in the last stages of becoming stable. Changes are | ||
unlikely, but backward incompatible changes are still allowed in extreme cases. | ||
Users can be reasonably sure that the feature won't change, but can't expect all | ||
implementations to support the feature yet. | ||
|
||
`STAGE-2` is a staging area for features that are ready to be declared stable, | ||
but are waiting for the next release or don't yet have enough implementations. | ||
When we see the vast majority of actively maintained implementations support | ||
gregsdennis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
this feature, it will be promoted to stable in the next release. Implementers | ||
SHOULD support `STAGE-2` features so they aren't out-of-date when the next | ||
release happens. | ||
|
||
Being in `STAGE-2` isn't a guarantee that a feature will be declared stable in | ||
the next release. If we don't see that the vast majority of actively maintained | ||
implementation have implemented the feature, it may stay in `STAGE-2` another | ||
year to allow implementations to catch up. | ||
|
||
`STAGE-2` features can only be promoted to stable as part of a release. | ||
|
||
**Promotion to Stable Checklist:** | ||
[] The vast majority of actively maintained implementations support the feature | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like we need to define... As an aside, I'm concerned thinking about "what if implementers don't implement?" But I think we should investigate further sponsoring implementation work at some point, which could aid this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
see #1348 (comment)
Yep. The more I think about it, the more I agree that this needs more definition. For example, an implementation may be active for bug fixes, but don't intent to add new features. Should that count? This probably needs discussion and probably doesn't need to be decided now as it will be a while before we have to make this determination.
The meaning of those words seem pretty clear to me. We could explicitly say it has to pass all the tests. Is there more nuance that I'm missing?
Sure. I think that speaks to increasing the pool of "actively maintained" implementations. |
||
|
||
### Stable | ||
Any part of the specification that doesn't have stability flag or has a year | ||
stability flag such as `2024` is considered stable. This flag indicates the year | ||
a feature was declared stable. Any changes to stable features MUST be backward | ||
compatible and not introduce problems for forward compatibility. Stable features | ||
are never removed, but may be deprecated. | ||
|
||
### Deprecated | ||
Any feature in the specification that is flagged in the form `DEPRECATED-{YEAR}` | ||
is considered deprecated as of the year specified. Implementations SHOULD still | ||
support these features to maintain backward compatibility. Deprecated features | ||
will never be removed from the spec, but schema authors SHOULD migrate away from | ||
using them as implementations may begin dropping support for these features at | ||
some point. | ||
|
||
A feature can only be deprecated as part of a release. | ||
|
||
## Release Process | ||
Releases occur on Jan 1 every year. Each release is identified with the | ||
four-digit year of when the release occurred. Releases never introduce anything | ||
new. The only change should be updating `STAGE-2` flags to `{YEAR}` flags for | ||
the features that are promoted to stable that year, or adding adding deprecation | ||
flags for any features that are deprecated that year. | ||
|
||
Implementations that express support for a particular release MUST support all | ||
features that are stable as of that release. | ||
|
||
A snapshot of the spec will be taken of the stable parts of the spec and made | ||
available as a PDF on the website. | ||
|
||
## Meta-Schemas | ||
Meta-schemas associated with the specification(s) maintained under this process | ||
are subject to the same compatibility rules as the specification. They can be | ||
updated at any time, but changes MUST be backward compatible and allow for | ||
forward compatibility with future schemas. | ||
Comment on lines
+169
to
+172
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have some questions/ comments here. Are we going to maintain meta-schemas attached to individual release snapshots? If we have a "current" meta-schema, which includes all of the stages, how can we update meta-schemas yet maintain backwards compatiblity? What if we wanted to update the meta-schemas to use a new keyword? That wouldn't be backwards compatible. I think backwards compatible meta-schemas only makes sense for a given release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just like the spec, there is one set of mutable meta-schemas that describe the current state of the specification. Because of backward and forward compatibility constraints, no matter what release of the spec the schema is written for, the latest meta-schemas is all you need.
We could have snapshots for reference like with the spec, but there wouldn't be reason to actually use those snapshots for anything other than historical reference.
The meta-schemas should include anything that's in the spec. That includes
Meta-schema changes should be backward compatible because spec changes are backward compatible.
I was thinking that the standard dialect meta-schema would allow additional keywords. If a keyword appears in the meta-schema but is not supported by the implementation, the implementation should raise an error. It's not something the meta-schema can know, so I consider it a runtime constraint the implementation needs to deal with, not the meta-schema. However, meta-schemas could disallow additional keywords and it shouldn't hurt anything. If an implementation is using an older version of the meta-schema that doesn't have a newer keyword used by the schema, then the implementation also wouldn't have support for the keyword. The result is always that you get an error that the implementation doesn't know the keyword. Either way, there shouldn't be a backward or forward compatibility issue and whether we choose to allow additional keywords in the meta-schema is not relevant to process, so we can discuss that when we get to writing the meta-schemas. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I expect there to be some discussion about meta-schema lifecycle that may end up as a bigger conversation. This was the kind of thing I thought might be best to get into after the initial merge. Like I said, I don't expect merging this document to mean it's "done". I expect it to be a first draft that we will iterate on. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are a number of assertions in your response which I don't agree with, but I don't think here's the right place to capture this discussion.
I think we need to discuss how we can break up the SDLC into more discreet chunks for further discussion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's exactly why I proposed merging this as a work-in-progress and opening issues to discuss the parts that need more discussion. Holding this up until we decide every detail makes it more difficult to have those discussions. |
||
|
||
Meta-schema URIs SHOULD NOT change once published, but if they do, the old URI | ||
MUST remain available and redirect to the new URI. | ||
|
||
Meta-schemas are considered non-normative. It's sometimes not possible or not | ||
practical for the meta-schema to describe every constraint in the specification. |
Uh oh!
There was an error while loading. Please reload this page.