Skip to content

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

Closed

Description

@ambroise-leclerc

MEDUI-DEC-004 says:

An @safety_critical node requires an explicit requirement identifier.

MEDUI-E070 registers the corresponding failure as "safety-critical node has no requirement", and conformance/safety/missing-requirement/ exercises it on a Button:

@safety_critical(cv_check: [Bounds])
Button {
    id: action;
    ...
}

spec/component-model.md lists requirement as optional for Button. So the case only makes sense if @safety_critical promotes an optional field to required — which is a real rule, but one stated only in the decision record, not in the component model where a reader looks for field requirements.

The reverse reading is equally available: components whose schema already requires requirement (CriticalButton, NumericDisplay, StatusIndicator) would raise the ordinary missing-field code MEDUI-E012, and E070 exists only for the promotion case.

Why it matters

The two readings produce different codes for the same authoring mistake. TrustSC enforces requirement from each component's own schema and has no rule keyed on @safety_critical, so it reports MEDUI-E012 for the components that require it and accepts the case's Button outright (Compliatory/TrustSC#49). That is a genuine behavioural gap on TrustSC's side, not just a labelling one, and it keeps safety unclaimed there — but it was only visible after tracing why E070 had no reachable raise site.

Suggested resolution

  • State the promotion rule in spec/component-model.md, not only in MEDUI-DEC-004: annotating a node with @safety_critical makes requirement required regardless of the component's own schema.
  • Say which code applies when a component's schema already requires requirement and it is absent — MEDUI-E012 or MEDUI-E070. My reading is that E012 is right there and E070 is specifically the promotion failure, but the registry entry as worded ("safety-critical node has no requirement") reads either way.
  • Consider a second case covering the already-required path, so the boundary between the two codes is pinned rather than inferred.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions