Diagnostic code registry
This is the canonical public registry for structured profile-zero diagnostics
emitted through nuif_core::Diagnostic and for failure codes retained by the
reference conformance trial. Automation must branch on code, not on the
human-readable message. Messages may gain detail without changing a code.
The severity below is the default for the owning profile. A code is never
repurposed; a materially different condition receives a new code. Adding a
code is compatible within an alpha profile, while removing a code or changing
its meaning requires a profile-version decision. entity, pointer and
fidelity remain the attribution fields defined by the diagnostic record.
Transport and command failures such as malformed CLI arguments, unavailable package capabilities and WASM input limits are error classes rather than document diagnostics. Their promotion boundary is tracked separately in SDK and language-binding boundary.
cargo xtask diagnostic-audit compares this bytewise-sorted table with every
code literal owned by model validation, layout evaluation and the conformance
trial. It writes target/diagnostic-registry-report.json and fails when a code
is undocumented, duplicated, stale, malformed or out of order.
| Code | Default severity | Category | Producer | Stable meaning |
|---|---|---|---|---|
ASSET_RESOURCE_REQUIRED | error | asset | model validation | A portable or substituted asset lacks an exact resource digest. |
ASSET_UNAVAILABLE_HAS_RESOURCE | error | asset | model validation | An unavailable asset incorrectly binds resource bytes. |
COLOR_CHANNEL_OUT_OF_RANGE | error | paint | model validation | An encoded-sRGB fill channel is outside the inclusive zero-to-one range. |
COMPONENT_BINDING_INVALID | error | component | model validation | A binding names no parameter of an enclosing defined component, or a parameter of the wrong type for the bound property (RFC 0018). |
COMPONENT_CYCLE | error | component | model validation | A component instantiates itself through nested instances or component parameters (RFC 0018). |
COMPONENT_DEFINITION_MISPLACED | error | component | model validation | A component definition is attached to an entity that is not a component (RFC 0018). |
COMPONENT_NESTED_DEFINITION | error | component | model validation | A component entity appears inside another component’s definition tree (RFC 0018). |
COMPONENT_OVERRIDE_INVALID | error | component | model validation | A variant override does not address a fitting definition entity, or repeats a property (RFC 0018). |
COMPONENT_PARAMETER_INVALID | error | component | model validation | A component parameter has an empty, long or repeated name, invalid enum options or a non-component default (RFC 0018). |
COMPONENT_VARIANT_INVALID | error | component | model validation | A variant does not set every enum parameter to a valid option, equals the defaults or repeats a configuration (RFC 0018). |
EXTENSION_FALLBACK_NOT_USED | error | extension | model validation | A fallback is declared for a namespace absent from extensions_used. |
EXTENSION_NAMESPACE_INVALID | error | extension | model validation | An extension namespace is not a valid lowercase NUIF identifier. |
EXTENSION_REQUIRED_NOT_USED | error | extension | model validation | A required namespace is absent from extensions_used. |
EXTENSION_REQUIRED_UNSUPPORTED | warning | extension | model validation | The implementation preserves but does not interpret a required namespace. |
EXTENSION_UNDECLARED | error | extension | model validation | An attached extension namespace is absent from extensions_used. |
EXTENSION_UNSUPPORTED | information | extension | model validation | The implementation preserves but does not interpret a used namespace. |
GRID_EXPLICIT_AREA_EXHAUSTED | error | grid | model validation | Sparse placement cannot fit another child inside the explicit grid. |
GRID_PLACEMENT_OUT_OF_BOUNDS | error | grid | model validation | An explicit grid position or span exceeds the declared tracks. |
GRID_PLACEMENT_OVERLAP | error | grid | model validation | Two children occupy an overlapping explicit grid area. |
GRID_PLACEMENT_PARTIAL | error | grid | model validation | A child declares only one coordinate of a required row or column pair. |
GRID_PLACEMENT_WITHOUT_GRID_PARENT | error | grid | model validation | Grid placement is authored outside a direct grid child. |
GRID_SPAN_INVALID | error | grid | model validation | A grid row or column span is zero. |
GRID_STYLE_WITHOUT_GRID_FAMILY | error | grid | model validation | Grid tracks or flow are authored on a non-grid container. |
GRID_TRACKS_REQUIRED | error | grid | model validation | A grid container lacks an explicit row or column axis. |
GRID_TRACK_INVALID | error | grid | model validation | A fixed track size or fractional weight is not finite and positive. |
GRID_TRACK_LIMIT_EXCEEDED | error | grid | model validation | A grid axis exceeds the profile-zero track limit. |
IMAGE_ASSET_INVALID | error | image | model validation | Image metadata has zero dimensions or an invalid decoder profile. |
IMAGE_ASSET_MISSING | error | image | model validation | Image paint references an absent or non-image asset. |
IMAGE_CROP_INVALID | error | image | model validation | The crop is not a finite positive normalized rectangle inside the source. |
IMAGE_PAINT_INVALID | error | image | model validation | Image transform, opacity or color-conversion identity is invalid. |
IMAGE_PAINT_KIND_INVALID | error | image | model validation | Image paint is authored on an entity outside the image kind. |
INSTANCE_APPEARANCE_AUTHORED | error | component | model validation | An instance of a defined component authors appearance that belongs to its component and root overrides (RFC 0018). |
INSTANCE_CHILDREN_AUTHORED | error | component | model validation | An instance of a defined component has authored children instead of a materialized subtree (RFC 0018). |
INSTANCE_EXPANSION_FAILED | error | component | layout evaluation | Materializing an instance exceeded the nesting or entity bounds or produced a colliding id (RFC 0018). |
INSTANCE_OVERRIDE_INVALID | error | component | model validation | An instance override does not address a fitting definition entity, or repeats a property (RFC 0018). |
INSTANCE_PARAMETER_INVALID | error | component | model validation | An instance parameter value is unknown, mistyped, not an option or equal to its default (RFC 0018). |
INSTANCE_STATE_MISPLACED | error | component | model validation | Instance state is attached to an entity that is not an instance (RFC 0018). |
INSTANCE_VARIANT_MISSING | error | component | model validation | An instance selects an enum configuration its component does not declare as a variant (RFC 0018). |
LAYOUT_CONSTRAINT_FALLBACK | warning | layout | layout evaluation | Profile zero evaluates a constraint family through its declared freeform fallback. |
LAYOUT_FAMILY_PROFILE0_FALLBACK | warning | layout | layout evaluation | Profile zero evaluates a flex family through its declared stack fallback. |
LAYOUT_STACK_STYLE_INVALID | error | model | model validation | Stack alignment and wrapping require the stack family, and the cross gap must be finite and non-negative. |
LAYOUT_UNKNOWN_KIND_FALLBACK | information | layout | layout evaluation | An unknown kind uses its declared container or leaf fallback geometry. |
MODEL_ASSET_KEY_MISMATCH | error | model | model validation | An asset map key differs from the asset’s embedded identity. |
MODEL_ASSET_VERSION_NOT_OPAQUE | error | model | model validation | A newer asset schema is represented as a known rather than unknown kind. |
MODEL_CHILD_MISSING | error | model | model validation | A child identity does not exist in the entity map. |
MODEL_COMPONENT_MISSING | error | model | model validation | An instance references an absent or non-component entity. |
MODEL_CONTAINMENT_CYCLE | error | model | model validation | Entity containment contains a cycle. |
MODEL_DOCUMENT_VERSION_NOT_MINIMAL | error | model | model validation | The document envelope version exceeds the minimum version its content requires (RFC 0014). |
MODEL_DOCUMENT_VERSION_TOO_LOW | error | model | model validation | The document envelope version is below the version its content requires (RFC 0014). |
MODEL_DOCUMENT_VERSION_UNSUPPORTED | error | model | model validation | The document schema version is newer than the implementation. |
MODEL_DUPLICATE_CHILD | error | model | model validation | One parent lists the same child more than once. |
MODEL_DUPLICATE_ROOT | error | model | model validation | The root list contains the same entity more than once. |
MODEL_ENTITY_KEY_MISMATCH | error | model | model validation | An entity map key differs from the entity’s embedded identity. |
MODEL_ENTITY_UNREACHABLE | error | model | model validation | An entity is unreachable from every root. |
MODEL_ENTITY_VERSION_NOT_OPAQUE | error | model | model validation | A newer entity schema is represented as a known rather than unknown kind. |
MODEL_IDENTIFIER_INVALID | error | model | model validation | A semantic identifier violates the lowercase NUIF grammar. |
MODEL_MULTIPLE_PARENTS | error | model | model validation | An entity is listed under more than one parent. |
MODEL_NON_FINITE_NUMBER | error | model | model validation | Authored semantic state contains a non-finite number. |
MODEL_RELATION_TARGET_MISSING | error | model | model validation | A relation endpoint is absent from the entity map. |
MODEL_RESOURCE_LIMIT_EXCEEDED | error | security | model validation | The decoded semantic document exceeds a profile-zero resource limit. |
MODEL_RESPONSIVE_RANGE_INVALID | error | model | model validation | A responsive minimum width exceeds its maximum width. |
MODEL_ROOT_HAS_PARENT | error | model | model validation | A root entity is also listed as a child. |
MODEL_ROOT_MISSING | error | model | model validation | A root identity does not exist in the entity map. |
MODEL_TOKEN_ALIAS_CYCLE | error | model | model validation | Token aliases form a cycle in the union of all mode values (RFC 0015). |
MODEL_TOKEN_ALIAS_DEPTH_EXCEEDED | error | model | model validation | A token alias chain exceeds the profile hop limit (RFC 0015). |
MODEL_TOKEN_COLLECTION_ID_CONFLICT | error | model | model validation | A token collection id is already used by another record (RFC 0015). |
MODEL_TOKEN_COLLECTION_KEY_MISMATCH | error | model | model validation | A token collection map key differs from the collection’s embedded identity. |
MODEL_TOKEN_COLLECTION_MEMBER_MISSING | error | model | model validation | A token collection lists a token that does not exist. |
MODEL_TOKEN_COLLECTION_MODES_EMPTY | error | model | model validation | A token collection declares no modes. |
MODEL_TOKEN_COLLECTION_NAME_EMPTY | error | model | model validation | A token collection has an empty name. |
MODEL_TOKEN_DEFAULT_MODE_MISSING | error | model | model validation | A token collection’s default mode is not one of its modes. |
MODEL_TOKEN_KEY_MISMATCH | error | model | model validation | A token map key differs from the token’s embedded identity. |
MODEL_TOKEN_MISSING | error | model | model validation | A property references an absent token. |
MODEL_TOKEN_MODE_ID_CONFLICT | error | model | model validation | A token mode id is already used by another record. |
MODEL_TOKEN_MODE_NAME_INVALID | error | model | model validation | A token mode name is empty or duplicated within its collection. |
MODEL_TOKEN_MODE_SELECTION_EMPTY | error | model | model validation | An entity has an empty token mode selection map. |
MODEL_TOKEN_MODE_SELECTION_ENTITY_MISSING | error | model | model validation | A token mode selection names an entity that does not exist. |
MODEL_TOKEN_MODE_SELECTION_INVALID | error | model | model validation | An entity selects a mode or collection that does not exist. |
MODEL_TOKEN_MODE_VALUE_INVALID | error | model | model validation | A token has a value for its default mode or for a mode outside its collection. |
MODEL_TOKEN_MULTIPLE_COLLECTIONS | error | model | model validation | A token belongs to more than one collection. |
MODEL_TOKEN_TYPE_MISMATCH | error | model | model validation | A collection token value or alias does not match the token type. |
RESOURCE_DIGEST_INVALID | error | resource | model validation | An asset resource digest is not canonical SHA-256 identity text. |
SNAPSHOT_FAILED | error | harness | conformance trial | A requested trial snapshot could not be evaluated or rendered. |
TEXT_COLOR_NOT_CANONICAL | error | text | model validation | A text declares opaque black explicitly; the default colour is omitted (RFC 0017). |
TEXT_COLOR_OUT_OF_RANGE | error | text | model validation | A text colour channel is non-finite or outside the inclusive zero-to-one range (RFC 0017). |
TEXT_FONT_BINDING_INVALID | error | text | model validation | Requested, replacement and asset font identities are inconsistent. |
TEXT_FONT_HASH_INVALID | error | text | model validation | A text font hash is not 64 lowercase hexadecimal digits. |
TEXT_FONT_LINKED | warning | text | layout evaluation | A name-only font has no bound bytes; layout uses the nuif-text-estimate-0 estimate (RFC 0017). |
TEXT_FONT_NOT_PINNED | warning | text | layout evaluation | The requested exact font is absent from the evaluation context. |
TEXT_FONT_SUBSTITUTED | warning | text | layout evaluation | Layout uses an explicit replacement font present in the evaluation context. |
TEXT_FONT_SUBSTITUTE_NOT_PINNED | warning | text | layout evaluation | The declared replacement font is absent from the evaluation context. |
TEXT_FONT_UNAVAILABLE | warning | text | layout evaluation | The bound font asset explicitly declares the resource unavailable. |
TEXT_LINE_HEIGHT_AMBIGUOUS | error | text | model validation | A text declares both or neither of an absolute line height and a line-height rule (RFC 0017). |
TEXT_LINE_HEIGHT_ESTIMATED | warning | text | layout evaluation | A font-metrics line height uses the 1.2 em estimate because face metrics are not read (RFC 0017). |
TEXT_LINE_HEIGHT_RULE_INVALID | error | text | model validation | A percent line-height rule is non-finite or not positive (RFC 0017). |
TEXT_METRICS_INVALID | error | text | model validation | Text size or line height is not finite and positive. |
TOKEN_BINDING_MISSING | error | token | model validation | A token binding names a token that does not exist or whose alias chain does not resolve (RFC 0019). |
TOKEN_BINDING_STALE | error | token | model validation | A bound property’s literal differs from its token’s value in the entity’s modes; writers refresh bindings (RFC 0019). |
TOKEN_BINDING_TARGET_INVALID | error | token | model validation | An entity cannot carry the bound property, such as a text property without text or a stroke property without a stroke (RFC 0019). |
TOKEN_BINDING_TYPE_MISMATCH | error | token | model validation | A bound token’s value does not have the type the property needs (RFC 0019). |
TRIAL_APPLY_FAILED | error | harness | conformance trial | A generated semantic patch failed atomic application. |
TRIAL_CBOR_ENCODE_FAILED | error | harness | conformance trial | The trial document could not be encoded as deterministic CBOR. |
TRIAL_CBOR_FIXPOINT_FAILED | error | harness | conformance trial | Deterministic CBOR did not reach an exact decode-encode fixpoint. |
TRIAL_CHOICE_LIMIT_EXCEEDED | error | harness | conformance trial | A generated choice stream exceeded its explicit decision budget. |
TRIAL_INVERSE_FAILED | error | harness | conformance trial | The inverse of an applied patch could not be applied. |
TRIAL_INVERSE_MISMATCH | error | harness | conformance trial | Applying a patch and its inverse did not restore the exact base document. |
TRIAL_RASTER_NONDETERMINISTIC | error | harness | conformance trial | Repeated CPU rasterization produced different bytes. |
TRIAL_REPLAY_FAILED | error | harness | conformance trial | Replaying a generated patch from the same base failed. |
TRIAL_REPLAY_HASH_MISMATCH | error | harness | conformance trial | Direct application and replay produced different canonical hashes. |
TRIAL_RERENDER_FAILED | error | harness | conformance trial | Repeated layout or scene construction failed. |
TRIAL_SNAPSHOT_FAILED | error | harness | conformance trial | The trial’s failure-reproduction snapshot could not be produced. |
TRIAL_TEXT_ENCODE_FAILED | error | harness | conformance trial | The trial document could not be encoded as canonical text. |
TRIAL_TEXT_FIXPOINT_FAILED | error | harness | conformance trial | Canonical text did not reach an exact decode-encode fixpoint. |
UNKNOWN_NAMESPACE_INVALID | error | extension | model validation | An unknown kind names an invalid extension namespace. |
UNKNOWN_NAMESPACE_UNDECLARED | error | extension | model validation | An unknown kind names a namespace absent from extensions_used. |
VALIDATION_DIAGNOSTICS_TRUNCATED | error | security | model validation | The validator reached its retained-diagnostic limit and stopped recording ordinary issues. |
VISUAL_CORNER_RADIUS_KIND_INVALID | error | visual | model validation | Corner radii are set on an ellipse, path or text entity (RFC 0016). |
VISUAL_CORNER_RADIUS_NEGATIVE | error | visual | model validation | A corner radius is negative (RFC 0016). |
VISUAL_OPACITY_OUT_OF_RANGE | error | visual | model validation | Opacity is outside the inclusive zero-to-one range (RFC 0016). |
VISUAL_ROTATION_OUT_OF_RANGE | error | visual | model validation | Rotation is outside the (-180, 180] degree range (RFC 0016). |
VISUAL_STROKE_COLOR_OUT_OF_RANGE | error | visual | model validation | A stroke colour channel is outside the inclusive zero-to-one range (RFC 0016). |
VISUAL_STROKE_KIND_INVALID | error | visual | model validation | A stroke is set on a text entity (RFC 0016). |
VISUAL_STROKE_WIDTH_NEGATIVE | error | visual | model validation | A stroke width is negative (RFC 0016). |