Sibling articles under this feature previously restated requirements in inconsistent forms.
Flow and algorithm
Platform spec article
Flow and algorithm
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).
Code lifecycle algorithm:
- Define or reuse an issue kind in
diagnostic_kinds.rs. - Emit that kind from a semantic rule in
analysis/rules. - Convert issue kind to stable code/category payload.
- Surface payload through services to CLI and LSP.
- Validate docs and source sync with diagnostics verification scripts.
The code identity must survive every handoff unchanged, even when message templates differ between clients.