Skip to content

State that @safety_critical promotes requirement; bound E070 vs E012 - #22

Merged
AM-L merged 2 commits into
mainfrom
spec/safety-critical-promotion
Sep 7, 2026
Merged

AM-L merged 2 commits into
mainfrom
spec/safety-critical-promotion

Conversation

@ambroise-leclerc

Copy link
Copy Markdown
Contributor

Closes #8.

MEDUI-DEC-004 said an @safety_critical node requires a requirement identifier, but spec/component-model.md — where a reader looks for field requirements — never said the annotation promotes an otherwise-optional field. E070 and E012 could each be read as the code for the same authoring mistake.

  • component-model.md gains a Safety annotations section: the annotation makes requirement required regardless of the component's own row (absence → MEDUI-E070), while a component that already requires requirement reports the ordinary MEDUI-E012, so the codes never overlap.
  • MEDUI-DEC-004 gains the same sentence.
  • Case conformance/semantics/safety-critical-already-required pins the E012 path: an annotated CriticalButton missing requirement, asserting E012 (not E070). It lives under semantics/ because E012 is a semantics-phase code — which the case itself is making the point about.

Pins a previously-inferred outcome → 0.2.0 candidate line.

Validation: python3 tools/validate.py → OK (21 cases, 26 diagnostics).

Stacked on #21.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes consistently clarify the spec/decision text and add a conformance case to pin the diagnostic boundary, with only a minor documentation nit noted.

Pull request overview

Clarifies the language contract around @safety_critical by explicitly stating that it promotes requirement to required (for otherwise-optional components), and disambiguates when MEDUI-E070 vs MEDUI-E012 must be reported, with a new conformance case pinning the “already required” path.

Changes:

  • Documented the @safety_critical → requirement promotion rule in spec/component-model.md, including the non-overlap rule for MEDUI-E070 vs MEDUI-E012.
  • Updated MEDUI-DEC-004 to match the clarified rule text and explicitly state the diagnostic-code boundary.
  • Added a new semantics conformance case asserting that an annotated component that already requires requirement reports MEDUI-E012 (not MEDUI-E070) when missing it.
File summaries
File Description
spec/component-model.md Adds a “Safety annotations” section explaining promotion of requirement and disambiguating MEDUI-E070 vs MEDUI-E012.
decisions/MEDUI-DEC-004-safety-and-goldens.md Aligns the decision record text with the clarified promotion rule and diagnostic boundary.
conformance/semantics/safety-critical-already-required/source.medui New fixture demonstrating an annotated CriticalButton missing requirement.
conformance/semantics/safety-critical-already-required/case.json New semantics case pinning MEDUI-E012 at the annotated node site.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread spec/component-model.md Resolved
@AM-L
AM-L force-pushed the spec/safety-critical-promotion branch from 506e69c to b1029c3 Compare September 7, 2026 07:21
@ambroise-leclerc
ambroise-leclerc force-pushed the spec/safety-critical-promotion branch from b1029c3 to 553b6d6 Compare September 7, 2026 07:27
@AM-L
AM-L force-pushed the spec/safety-critical-promotion branch from 553b6d6 to 6ed78c8 Compare September 7, 2026 07:32
@AM-L
AM-L force-pushed the spec/safety-critical-promotion branch from 6ed78c8 to 41e440e Compare September 7, 2026 07:36
@AM-L
AM-L force-pushed the spec/safety-critical-promotion branch from 41e440e to 5794e34 Compare September 7, 2026 07:38
Base automatically changed from spec/e035-unknown-resource-id to main September 7, 2026 07:40
…nst E012

MEDUI-DEC-004 said an @safety_critical node requires a requirement identifier,
but spec/component-model.md - where a reader looks for field requirements -
never said the annotation promotes an otherwise-optional field. E070 and E012
could each be read as the code for the same authoring mistake.

component-model.md now has a Safety annotations section: the annotation makes
requirement required regardless of the component's own row (absence -> E070),
while a component that already requires requirement reports the ordinary E012,
so the codes never overlap. MEDUI-DEC-004 gains the same sentence.

Case conformance/semantics/safety-critical-already-required pins the E012 path:
an annotated CriticalButton missing requirement, asserting E012, not E070.
@AM-L
AM-L force-pushed the spec/safety-critical-promotion branch from 5794e34 to d302e02 Compare September 7, 2026 07:41
Follow-up to review on PR #22: one reference used the shortened E070.
@ambroise-leclerc

Copy link
Copy Markdown
Contributor Author

Addressed in a96db8e: the one shortened E070 in the Safety annotations section is now MEDUI-E070. No other shortened refs in the changed files.

@AM-L
AM-L merged commit 7ed438a into main Sep 7, 2026
2 checks passed
@AM-L
AM-L deleted the spec/safety-critical-promotion branch September 7, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E070: is requirement promoted to required by @safety_critical, and where does E012 end?

3 participants