Skip to content

Commit abcbf05

Browse files
committed
ADR SDLC - Improve Option 2 description
1 parent 3c40dd8 commit abcbf05

File tree

1 file changed

+53
-55
lines changed

1 file changed

+53
-55
lines changed

adr/2022-11-stable-spec.md

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ There have been two proposals put forward. Both address the goal of a stable
2525
specification with the ability to evolve. The third option represents sticking
2626
with the status quo.
2727

28-
### Option 1 - TC-39 inspired
28+
### Option 1 - TC-39 Inspired
2929
The spec would be converted from I-D XML to Markdown, but can otherwise be
3030
structured however we choose. A system would be put in place to allow us to flag
3131
the stability level of any feature in the spec. There would be only one version
@@ -44,66 +44,64 @@ designated by the year they were released.
4444

4545
### Option 2 - IETF Inspired
4646
The spec would be reorganized into two parts: "Core Semantics" and "Standard
47-
Extensions".
47+
Extensions". Changes to either spec are subject to strict backward and forward
48+
compatibility requirements and would be released as a new spec that replaces and
49+
obsoletes past versions of the spec.
4850

49-
The "Core Semantics" spec would contain the bare minimum rules that
50-
must be implemented for validators to not produce inaccurate results regardless
51-
of future revisions or extensions. Among other necessities, this would include a
51+
The "Core Semantics" spec would contain the bare minimum rules that must be
52+
implemented for validators to not produce inaccurate results regardless of
53+
future revisions or extensions. Among other necessities, this would include a
5254
core set of keywords necessary to fully support structural validation and an
53-
extension mechanism. This spec should be considered stable and should rarely
54-
change, but if it does, it must maintain backward and forward compatibility.
55-
56-
The "Standard Extensions" spec would include the rest of the spec. Features and
57-
keywords included in this spec are so ubiquitous that they should be considered
58-
essential for implementations to support. Changes to this spec must be
59-
compatible with previous releases with exceptions only in extreme cases.
60-
61-
A registry could be maintained that maps keywords to their specified semantics.
62-
User extensions that aren't in the registry should use a URI for their keyword
63-
to avoid conflicts with other third-party extensions or with future standard
64-
extensions.
55+
extension mechanism. This spec should rarely change. New features would be added
56+
through additional specifications that define extensions to the "Core Semantics"
57+
spec.
58+
59+
The "Standard Extensions" spec is an example of one of these extension
60+
specifications. This spec would be authored by the JSON Schema Org, but
61+
extension specifications could be authored by anyone. The "Standard Extensions"
62+
spec would include everything from the current spec that isn't included in the
63+
"Core Semantics" spec. Features and keywords included in this spec are so
64+
ubiquitous that they should be considered essential for implementations to
65+
support.
6566

6667
### Option 3 - Minimal Change
6768
Option 3 represents the minimal amount of change to our process from what we
6869
have been doing. The spec would need to be converted from I-D XML to a Markdown
6970
version that would be served on the website, but otherwise we would continue to
70-
work the way we have been. We would aim for new version release every year with
71-
a patch release mid-cycle. Each release is a distinct version of JSON Schema and
71+
work the way we have been. We would aim for new version releases every year with
72+
patch releases mid-cycle. Each release is a distinct version of JSON Schema and
7273
has no compatibility guarantees between versions.
7374

7475
## Decision Outcome
75-
The decision is to go with Option 1 while leaving discussion open for nearly all
76-
of Option 2 because it is mostly compatible with Option 1. Option 2 uses an
77-
immutable spec where each release replaces the last while the Option 1 uses a
78-
mutable spec. The outcome of having only one current version of the spec is
79-
achieved with either option, but the mutable spec allows us to remove some
80-
unnecessary roadblocks in our development processes and allows us to release a
81-
stable spec much sooner. Other than that, discussion for the rest of Option 2
82-
can continue within the constraints of Option 1.
83-
84-
Option 1 puts no constraint on the structure of the spec and restructuring is
85-
allowed at any time as long as it doesn't break compatibility requirements.
86-
Therefore, restructuring the spec as "Core Semantics" and "Standard Extensions"
87-
is compatible with Option 1. We can move forward with Option 1 now while leaving
88-
the restructuring discussion open.
89-
90-
Option 2 defines a new extension mechanism and some new keywords. These features
91-
can be introduced under the stability model described in Option 1. Therefore, we
92-
can move forward with Option 1 while leaving the discussion open for these new
93-
features.
76+
The decision is to go with Option 1 while leaving discussion open for aspects of
77+
Option 2 that could be adopted within the constraints of Option 1.
78+
79+
Option 2 uses an immutable spec where each release replaces the last while
80+
Option 1 uses a mutable spec. The outcome of having only one current version of
81+
the spec is achieved with either option, but the mutable spec allows us to
82+
remove some unnecessary roadblocks in our development processes and allows us to
83+
release a stable spec much sooner.
84+
85+
Option 2's restructuring of the spec into "Core Semantics" and "Standard
86+
Extensions" isn't specifically ruled out, but spec evolution is expected to be
87+
done primarily through mutation of the spec guided by the stability process
88+
rather than through extension. Option 1 puts no constraint on the structure of
89+
the spec and restructuring is allowed at any time as long as it doesn't break
90+
compatibility requirements.
9491

9592
## Pros and Cons of the Options
9693
The biggest benefit is shared between Option 1 and Option 2. Both approaches
97-
result in a stable spec. This will have benefits implementers and users. Because
98-
of the compatibility requirements, whenever you write a schema, you will never
99-
need to change it just to keep up with new features added to JSON Schema. This
100-
is also better for implementers because they don't have to maintain separate
101-
code with different semantics in different versions. They just need to code for the
102-
current release and they will automatically have support for past releases.
94+
result in a stable spec. This will have benefits for both implementers and
95+
users. Because of the compatibility requirements, whenever you write a schema,
96+
you will never need to change it just to keep up with changes to JSON Schema.
97+
This is also better for implementers because they don't have to maintain
98+
separate code with different semantics in different versions. They just need to
99+
code for the current release and they will automatically have support for past
100+
releases.
103101

104102
### Option 1 - TC-39 Inspired
105-
The two things that make this option stand out are the stability model and the
106-
mutability of the spec document.
103+
The two things that make this option stand out are the stability model governing
104+
spec evolution and the mutability of the spec document.
107105

108106
Having a mutable spec allows us to make clarifications and bug fixes immediately
109107
rather than having to wait months or years for the next release to go out. It
@@ -129,9 +127,9 @@ it much more likely that we don't get stuck with something that doesn't work out
129127
or could be done better.
130128

131129
The stability model also makes it clear to users which features are stable and
132-
how likely an unstable feature is to change in the future. Whether they prefer
133-
to stick with stable features or want to use a new keyword, users have the
134-
information they need to make that decision.
130+
how likely a feature is to change in the future. Whether they prefer to stick
131+
with stable features or want to use a new keyword, users have the information
132+
they need to make that decision.
135133

136134
The downside of the stability model is that it presents a very high barrier for
137135
a feature to make it into a stable status. It would typically take two years for
@@ -142,14 +140,14 @@ feature.
142140
### Option 2 - IETF Inspired
143141
The benefit of this approach is that it's compatible with the IETF process
144142
without imposing some of the constraints and perception issues that we had with
145-
IETF. We can pursue an RFC in the future if we choose to without significant
146-
changes or spec restructuring.
143+
our previous process. We can pursue an RFC in the future if we choose to without
144+
significant changes or spec restructuring.
147145

148146
With this proposal, releases are done as a new document that replaces the
149-
previous documents. Compared to the constantly evolving spec in Option 1, change
150-
from non-functional clarifications and bug fixes to adding and evolving new
151-
features takes much longer if you have to wait for the next release to make a
152-
change. This lengthens the feedback loop slowing spec development progress.
147+
previous documents. Compared to the constantly evolving spec in Option 1,
148+
changes from non-functional clarifications and bug fixes to adding and evolving
149+
new features takes much longer if you have to wait for the next release to make
150+
a change. This lengthens the feedback loop slowing spec development progress.
153151

154152
The main downside of this approach compared to Option 1 is that it will likely
155153
take quite a while to get to a stable release. The spec restructuring is

0 commit comments

Comments
 (0)