#[non_exhaustive]pub struct AppliedFix {
pub proposal: FixProposal,
pub confidence: Confidence,
pub source: FixSource,
pub timestamp: SystemTime,
pub classifier_id: Option<Arc<str>>,
pub dry_run: bool,
pub input: Option<Arc<str>>,
}Expand description
A promoted FixProposal with runtime context.
Constructed only by Engine::fix at the moment a FixProposal meets
the confidence threshold. Never constructed by a rule or suggestion path.
Serves as the audit record: the NDJSON schemas at contracts/audit-record*.json
serialize this type.
classifier_id is an Arc<str> so promoting many fixes from a single
document only clones an atomic refcount, not the underlying string.
§v2 audit fields (confidence, source)
Phase D promotes the fix’s Confidence and FixSource to
top-level fields on AppliedFix so the v2 audit emitter doesn’t
need to descend into .proposal to find them. They are a snapshot
at promotion time — the engine may (in future phases) adjust them
for region context before promotion, so they can diverge from the
original proposal.confidence / proposal.source. Today the
engine promotes them unchanged from the proposal.
Both fields are redundant with the proposal sub-struct by design:
the v1 schema reads them through proposal; the v2 schema reads
the top-level fields. Keeping both paths live makes the v1→v2
transition a pure emitter change rather than a data-model change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.proposal: FixProposalThe original proposal that was applied.
confidence: ConfidenceSnapshot of the fix’s confidence at promotion time (v2 audit).
source: FixSourceSnapshot of the fix’s provenance at promotion time (v2 audit).
timestamp: SystemTimeTimestamp of application (clock-injected).
classifier_id: Option<Arc<str>>Classifier identity from runtime config. None if not configured.
dry_run: booltrue if produced under --dry-run (FR-006).
input: Option<Arc<str>>Caller-supplied input identifier (file path, “-” for stdin, None if N/A).
Trait Implementations§
Source§impl Clone for AppliedFix
impl Clone for AppliedFix
Source§fn clone(&self) -> AppliedFix
fn clone(&self) -> AppliedFix
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more