docs(spec): define normative keywords (RFC 2119 / RFC 8174)#176
docs(spec): define normative keywords (RFC 2119 / RFC 8174)#176rishi-jat wants to merge 1 commit intomodelpack:mainfrom
Conversation
Signed-off-by: Rishi Jat <rishijat098@gmail.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the clarity and precision of the specification by incorporating a dedicated section for normative language. By adopting the definitions from RFC 2119 and RFC 8174, the document now provides unambiguous guidance on the meaning of critical keywords, ensuring consistent interpretation and adherence to standard technical drafting practices. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a 'Normative Language' section to the specification, defining keywords like MUST and SHOULD by referencing RFC 2119 and RFC 8174. This is a good step towards aligning the spec with standard practices. My review includes a couple of suggestions to improve the document's usability and maintainability: making the RFC references clickable links and sorting the link definitions alphabetically.
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | ||
| "OPTIONAL" in this document are to be interpreted as described in | ||
| RFC 2119 and RFC 8174 when, and only when, they appear in all capitals. |
There was a problem hiding this comment.
For better readability and to make it easier for readers to find the referenced RFCs, it's a good practice to make the RFC mentions clickable links. You've already added the link definitions at the end of the file.
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |
| "OPTIONAL" in this document are to be interpreted as described in | |
| RFC 2119 and RFC 8174 when, and only when, they appear in all capitals. | |
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |
| "OPTIONAL" in this document are to be interpreted as described in | |
| [RFC 2119][rfc2119] and [RFC 8174][rfc8174] when, and only when, they appear in all capitals. |
| [image-spec]: https://github.com/opencontainers/image-spec/blob/main/spec.md#image-format-specification | ||
| [rfc1952_2]: https://tools.ietf.org/html/rfc1952 | ||
| [rfc2119]: https://www.rfc-editor.org/rfc/rfc2119 | ||
| [rfc8174]: https://www.rfc-editor.org/rfc/rfc8174 | ||
| [tar-archive]: https://en.wikipedia.org/wiki/Tar_(computing) | ||
| [image-manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md | ||
| [rfc8478]: https://tools.ietf.org/html/rfc8478 |
There was a problem hiding this comment.
To improve maintainability, it's a good practice to keep reference link definitions sorted alphabetically.
| [image-spec]: https://github.com/opencontainers/image-spec/blob/main/spec.md#image-format-specification | |
| [rfc1952_2]: https://tools.ietf.org/html/rfc1952 | |
| [rfc2119]: https://www.rfc-editor.org/rfc/rfc2119 | |
| [rfc8174]: https://www.rfc-editor.org/rfc/rfc8174 | |
| [tar-archive]: https://en.wikipedia.org/wiki/Tar_(computing) | |
| [image-manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md | |
| [rfc8478]: https://tools.ietf.org/html/rfc8478 | |
| [image-manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md | |
| [image-spec]: https://github.com/opencontainers/image-spec/blob/main/spec.md#image-format-specification | |
| [rfc1952_2]: https://tools.ietf.org/html/rfc1952 | |
| [rfc2119]: https://www.rfc-editor.org/rfc/rfc2119 | |
| [rfc8174]: https://www.rfc-editor.org/rfc/rfc8174 | |
| [rfc8478]: https://tools.ietf.org/html/rfc8478 | |
| [tar-archive]: https://en.wikipedia.org/wiki/Tar_(computing) |
There was a problem hiding this comment.
Pull request overview
Adds a Normative Language section to the model format specification so RFC 2119 / RFC 8174 keyword interpretations (MUST/SHOULD/MAY, etc.) are explicitly defined and consistent with common spec-writing practice.
Changes:
- Introduces a “Normative Language” section describing interpretation of uppercase normative keywords.
- Adds RFC 2119 and RFC 8174 link references to the spec’s reference list.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | ||
| "OPTIONAL" in this document are to be interpreted as described in | ||
| RFC 2119 and RFC 8174 when, and only when, they appear in all capitals. |
There was a problem hiding this comment.
The Normative Language section mentions RFC 2119 / RFC 8174 as plain text, but the document otherwise uses reference-style links (e.g., [gzip][rfc1952_2]). Consider linking these as [RFC 2119][rfc2119] and [RFC 8174][rfc8174] to keep the style consistent and to make the added references actionable.
| RFC 2119 and RFC 8174 when, and only when, they appear in all capitals. | |
| [RFC 2119][rfc2119] and [RFC 8174][rfc8174] when, and only when, they appear in all capitals. |
| [rfc2119]: https://www.rfc-editor.org/rfc/rfc2119 | ||
| [rfc8174]: https://www.rfc-editor.org/rfc/rfc8174 |
There was a problem hiding this comment.
The newly added reference definitions [rfc2119] and [rfc8174] are currently unused in the document. Either use them in the Normative Language section (preferred) or remove them to avoid unused link references / markdown-lint failures.
|
/cc @chlins |
The specification uses terms like MUST, SHOULD, and MAY but did not define how they should be interpreted.
This PR adds a Normative Language section referencing RFC 2119 and RFC 8174 to clarify the meaning of these keywords and align the spec with standard drafting practices.