Expand description
Confidence — Phase D audit-provenance payload.
Every FixProposal carries a Confidence
record describing how the engine arrived at the proposal. The
record stores two primary scalar confidence axes —
recognition and rule — plus optional auxiliary fields
(region and runner_up_ratio) and a list of named feature
contributions. Together they reconstruct the decoder’s scoring
path so an auditor can verify why a given fix was promoted.
The engine’s current threshold-facing combined score is
recognition * rule as exposed by Confidence::combined.
region is recorded as additional audit/context metadata when
available, but it does not currently participate in that
combined score. runner_up_ratio likewise provides decoder
provenance rather than a direct multiplicative/additive input to
combined().
§Precision: f32 throughout
All scores are f32. The decoder scores in f64 internally
(log-priors and posteriors accumulate across many features), but
the emitted Confidence downcasts once at the boundary so the
audit record stays compact and byte-stable. This matches the
foundational-plan invariant line 739-757.
§features is closed
FeatureId is a non-#[non_exhaustive] closed enum. A new
feature means a new variant and a coordinated bump of the audit
schema version (MARQUE_AUDIT_SCHEMA) — silent additions would
break the auditability contract on already-emitted records.
Structs§
- Confidence
- Multi-axis confidence attached to every
FixProposal. - Feature
Contribution - One named contribution to
Confidence::recognition.
Enums§
- Feature
Id - Closed enumeration of features the decoder can record.