Sibling articles under this feature previously restated requirements in inconsistent forms.
FAQ and troubleshooting
Platform spec article
FAQ and troubleshooting
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).
A new rule compiles, but docs sync fails. Why?
Section titled “A new rule compiles, but docs sync fails. Why?”The rule likely emits a kind not represented in the documented registry mapping. Update both source and docs references together.
Can I rename an existing diagnostic code?
Section titled “Can I rename an existing diagnostic code?”Treat code renames as migrations, not inline edits. Preserve compatibility notes and update downstream filters before removing old identifiers.
Where do I debug code mismatch between CLI and editor?
Section titled “Where do I debug code mismatch between CLI and editor?”Start with diagnostic_kinds.rs, then check conversion in analysis services and LSP diagnostics adapters to ensure code strings are passed through unchanged.