Skip to content
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

Clarify stage 3 entrance criteria #336

Open
past opened this issue Nov 19, 2024 · 1 comment
Open

Clarify stage 3 entrance criteria #336

past opened this issue Nov 19, 2024 · 1 comment

Comments

@past
Copy link

past commented Nov 19, 2024

The guidance provided in the stages process is a bit unclear and somewhat inconsistent, as was evident in the discussions we had recently at WHATNOT meetings. More specifically I think these points are conflicting:

  • "Complete specification text" and "The solution is complete and no further work is possible without implementation experience, significant usage and external feedback". If this is the entrance criteria and what the stage signifies, then it becomes unclear what is the difference between stage 3 and stage 4.
  • "Specification is complete: all data structures, processing model, and API are fully described". The only carve-outs in the text are "small issues that will be identified by editor review", which can be interpreted as editorial nits. However nobody at the 2 WHATNOT meetings was of the opinion that stage 3 would be short-lived and only about editorial changes.
  • "Full specification and comprehensive tests are completed". I suspect that the intention here is for the tests to exist, but not necessarily to not need any improvements based on stage 3 feedback and implementation experience. It would be nice to reword this, if that is the case (maybe "available" instead of "completed").

If the intent is for stage 3 to be indeed short-lived, it would also be useful to clarify so in the text, so it sets the right expectations.

@domenic is going to provide some TC39-inspired examples of how this stage could work for WHATWG.

@domenic
Copy link
Member

domenic commented Nov 20, 2024

My original vision of stage 3 was aligned with that of TC39. There, it basically means "finished, pending editorial nit review---but since multiple implementations haven't happened yet, there's a reasonable chance that we'll discover something is broken, and need to fix the normative content". "Something is broken" is usually some small edge case, but very rarely could be something fundamental.

Examples of normative issues found during stage 3 in TC39 include:


I think the TC39 standard is still a good one to apply to WHATWG stage 3. However, how that works in practice is affected by at least the following important differences between the TC39 process and ours:

  • The TC39 process involves much less early implementation experience than typical WHATWG features. In TC39, typically implementations hold off on even prototype code until stage 3. In the WHATWG, we usually see one implementer prototyping as early as stage 1, and definitely during stage 2.
  • The TC39 process requires two full implementations, ideally both shipping, to graduate from stage 3 to stage 4. In the WHATWG, we only require meeting the WHATWG working mode requirements, i.e. must have two implementers "in support", should have a prototype implementation, and should be no strong objections.
  • In TC39, the test-writing process is done by separate groups than the implementers. This has led to the introduction of "stage 2.7", if I understand correctly. Let's not discuss that today.

In practice, this means that in TC39 there are two long stages: stage 2, when the committee is both debating whether the problem is worth solving, and writing spec text that is as-good-as-possible without any implementer experience; and stage 3, where a lot of time is spent waiting for implementations and responding to implementer feedback.

I think if we keep the TC39 standard for stage 3 in the WHATWG, the differences between the groups would manifest in stage 2 being the long one at the WHATWG, and stage 3 being pretty short. Because during stage 2 we'd not only resolve the "do we want to do this" question, but also get all the feedback from the initial implementation. And we wouldn't need to wait for the second implementation to graduate from 3 to 4. So for the WHATWG, stage 3 would last roughly as long as it takes the editor to finish their review.

Note that in both TC39 and the WHATWG stages, the existence of stage 4 is basically a formality, because in both cases the feature is "finished" according to the process. So there is a sense in which stage 4 is pointless, and we could as well denote "done with the stages process" by "no stage".


Responding to specific points:

  • Complete specification text" and "The solution is complete and no further work is possible without implementation experience, significant usage and external feedback". If this is the entrance criteria and what the stage signifies, then it becomes unclear what is the difference between stage 3 and stage 4.

In my proposed vision, the difference is just that in stage 4, the spec is merged and has finished editor review. This editor review could be lengthy, especially if the feature is large and/or the contributor is new to WHATWG spec convenentions, but it will usually be short.

It's also possible that editor review will identify normative changes, not just editorial nits. They'll usually be small, especially if a prototype implementation already exists. The kind of thing I'm thinking of is consistency suggestions, e.g. which types of error to throw, or property naming, or similar, which weren't caught by anyone earlier in the process.

Finally, our process allows for cases where there's no prototype implementation started until stage 3, in which case we might see larger changes. I'm not sure we'll see this much, as for small features that are easy to implement "in one go" people probably won't need the stages process, whereas for large features people will probably prefer to start a prototype implementation early. But I think it's reasonable to allow it.

  • "Full specification and comprehensive tests are completed". I suspect that the intention here is for the tests to exist, but not necessarily to not need any improvements based on stage 3 feedback and implementation experience. It would be nice to reword this, if that is the case (maybe "available" instead of "completed").

I agree some caveating here would be helpful, to express that tests may need to be revised in response to stage 3 feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants