Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Diagnostics produced by the planner — port of the subset of diagnostics.ts that Plan needs / Diagnostics.java.

Structs§

Diagnostic
One diagnostic: its code, severity, and the source span it points at.

Enums§

DiagnosticCode
The closed set of diagnostic codes the planner produces. Ord follows the Java enum’s declaration order (ordinal), matching its sort semantics.
Severity
Diagnostic severity. Only Error is constructed today.

Functions§

ambiguous_anchor
The anchor names more than one heading in the target document (two headings slugify identically), so the reference could mean either section. Reported rather than guessed: rename the headings so each has an anchor of its own.
ambiguous_match
Builds an ambiguous-match diagnostic pointing at span.
error_fence_without_step
Builds an error-fence-without-step diagnostic pointing at span.
reference_cycle
References nest to any depth, so a chain that reaches a section already on it is reported rather than recursed into.
reference_empty
The referenced document exists but the section contributes no steps — a mistyped anchor, or a section that is pure prose.
reference_not_found
A reference block (ADR 0016) points at an oath the workspace does not hold. Never prose: a link-only block that resolves to nothing has no other reading, so it fails the run rather than degrading silently.