Sibling articles under this feature previously restated requirements in inconsistent forms.
Contracts and edge cases
Platform spec article
Contracts and edge cases
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Diagnostic code registry.
Context
Decision
This feature hub owns normative MUST/SHOULD contract text. Sibling articles must not redefine hub requirements and should link here for authority.
Consequences
Contract changes start on the hub or in linked ADRs, then propagate to articles and implementation anchors.
Verification anchors
site/website/src/content/docs/platform-spec/compiler/semantic-pipeline/diagnostic-code-registry/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Diagnostic code registry.
Context
Implementation crates accumulated informal notes that diverged from published contracts.
Decision
Normative platform-spec prose and ADRs under this feature supersede informal comments in implementation crates until explicitly migrated into spec text.
Consequences
Engineers file spec/ADR updates when behavior changes; crate comments are non-authoritative for conformance arguments.
Verification anchors
compiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rscompiler/crates/beskid_analysis/src/analysiscompiler/crates/beskid_analysis/src/doc/validate.rs
-
Rendered diagnostics drifted from semantic registry.
Context
Rendered diagnostics drifted from semantic registry.
Decision
Code-to-meaning mapping is normative in
SemanticIssueKind::code()anddiagnostic_kinds.rs, synchronized with trudoc verify scripts—not LSP presentation layers.Consequences
Renaming codes requires migration notes; new issues need unique codes before release.
Verification anchors
compiler/crates/beskid_analysis/src/analysis/diagnostic_kinds.rspackages/trudoc/scripts/verify-diagnostics-spec-sync.mjs.
- Contracts and edge cases Stability requirements and risky changes in the diagnostic registry.
- Design model Conceptual model for owning and evolving semantic diagnostic codes.
- Examples Representative registry update scenarios and expected outcomes.
- FAQ and troubleshooting Common registry maintenance questions and recovery guidance.
- Flow and algorithm Lifecycle of a semantic diagnostic code from definition to surfaced output.
- Verification and traceability Checks that keep diagnostic code docs and source synchronized.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Registry contracts:
- Codes must be unique and semantically stable once published.
- Rules may evolve messages, but not silently repurpose existing codes.
- Deprecated codes should remain documented until consumer migration is complete.
Edge cases:
- Splitting one broad issue into multiple specific codes can break external filters.
- Merging codes can hide important distinctions used by editor workflows.
- Reordering kinds without preserving explicit mappings may create accidental code churn.