pub enum FixSource {
BuiltinRule,
CorrectionsMap,
MigrationTable,
DecoderPosterior,
DecoderClassificationHeuristic,
}Expand description
Provenance of a fix proposal — where the fix recommendation originated.
Variants§
BuiltinRule
Hand-written Layer 2 CAPCO rule.
CorrectionsMap
User [corrections] entry (FR-009).
MigrationTable
Deterministic deprecated-marking conversion (FR-004a).
DecoderPosterior
Probabilistic decoder produced this fix from a recognition
candidate’s posterior (Phase D, see
docs/plans/2026-04-16-probabilistic-recognition.md). Paired
with a non-trivial features list in
FixProposal::confidence so auditors can reconstruct the
scoring path.
DecoderClassificationHeuristic
Decoder produced this fix via a position-aware short-token
classification heuristic — a keyboard-proximity table applied
to the leading classification slot of a portion or banner
marking when the token is too short for vocab-based fuzzy
matching (e.g., (YS//NF) → (TS//NF), (W//NF) → (S//NF)).
See issue #133 PR 2.
The heuristic is inherently less certain than a fuzzy-vocab
match because the inference is “this token is keyboard-
adjacent to a known classification” rather than “this token
is edit-distance ≤ 2 from a known canonical token in a
closed vocabulary.” The engine therefore (a) emits the
diagnostic at Severity::Warn (the fix-and-warn pattern —
always visible, non-zero exit code in --check), and
(b) caps Confidence::rule at 0.80 so combined ≤ 0.80
stays below the default confidence_threshold of 0.95.
The fix only auto-applies when the user has explicitly
lowered the threshold to opt into the heuristic’s bar.