Repository navigation
State that @safety_critical promotes requirement; bound E070 vs E012 - #22
Conversation
There was a problem hiding this comment.
🟢 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→requirementpromotion rule inspec/component-model.md, including the non-overlap rule forMEDUI-E070vsMEDUI-E012. - Updated
MEDUI-DEC-004to 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
requirementreportsMEDUI-E012(notMEDUI-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.
506e69c to
b1029c3
Compare
b1029c3 to
553b6d6
Compare
553b6d6 to
6ed78c8
Compare
6ed78c8 to
41e440e
Compare
41e440e to
5794e34
Compare
…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.
5794e34 to
d302e02
Compare
Follow-up to review on PR #22: one reference used the shortened E070.
|
Addressed in |
Closes #8.
MEDUI-DEC-004said an@safety_criticalnode requires a requirement identifier, butspec/component-model.md— where a reader looks for field requirements — never said the annotation promotes an otherwise-optional field.E070andE012could each be read as the code for the same authoring mistake.component-model.mdgains a Safety annotations section: the annotation makesrequirementrequired regardless of the component's own row (absence →MEDUI-E070), while a component that already requiresrequirementreports the ordinaryMEDUI-E012, so the codes never overlap.MEDUI-DEC-004gains the same sentence.conformance/semantics/safety-critical-already-requiredpins theE012path: an annotatedCriticalButtonmissingrequirement, assertingE012(notE070). It lives undersemantics/becauseE012is 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.