Skip to content

Five conditions component-model.md makes fatal have no registered diagnostic code #3

Closed

Description

@ambroise-leclerc

spec/component-model.md ends with:

Unknown theme tokens, image IDs, templates, charsets, formats, system events, or CV checks fail compilation.

Seven fatal conditions, but spec/diagnostics.md registers a code for only two of them: MEDUI-E030 (theme token) and MEDUI-E071 (CV check). The other five have no identity:

Condition Registered code
Unknown theme token MEDUI-E030
Unknown CV check MEDUI-E071
Unknown image ID —
Unknown template —
Unknown charset —
Unknown clock format —
Unknown system event —

An unknown layout kind (layout: Circular) is fatal too and likewise unregistered.

Every implementation must therefore report these under some other code. In practice that means the generic syntax code, which places a semantic failure in the wrong phase — so two implementations can both be "conformant" while disagreeing on the phase a failure belongs to, and a consumer filtering diagnostics by phase gets different results from each.

Context from a consumer

While replacing message-derived codes with codes assigned at each raise site, TrustSC found 24 raise sites with no registered code (Compliatory/TrustSC#49). They are now tagged with an explicit code::UNREGISTERED constant that resolves to MEDUI-E010, so they stay greppable and can be migrated when codes exist. The behaviour is unchanged; only the intent is now recorded.

Suggested resolution

Register codes in the MEDUI-E03x semantics range for the unknown-identifier family — one per resource kind, or a single unknown resource identifier code with the kind in the message. A single code is simpler and probably sufficient, since the message already names the resource. Add a conformance case per code.

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