pub struct Correction {
pub correction_id: String,
pub author: String,
pub target: CorrectionTarget,
pub corrected: Value,
pub scope: ScopeAddress,
pub rationale: Option<String>,
}Expand description
A human correction: the highest-trust input the learning system has, and the loop treats it accordingly — a correction becomes an attributed candidate memory or example, never an in-place rewrite of what it corrects.
author is mandatory and validated at deserialization (see
deserialize_non_empty_id); attribution then travels with every
derived record as human:{author} provenance with the correction id in
evidence — the design’s human:{author} via correction:{id} string —
so every later consumer (distiller, evaluator, auditor) can trace the
record to the person and the moment.
Fields§
§correction_id: StringThe correction’s own id, caller-minted; carried in the derived records’ evidence (and therefore their content addresses — two corrections with identical corrected content stay distinct records).
The correcting human’s identity. Mandatory.
target: CorrectionTargetWhat it corrects.
corrected: ValueThe corrected content: what the derived record asserts.
scope: ScopeAddressThe scope the result should live at. Scope decides the path
(Correction::is_candidate): run scope is adopted directly (it
affects only the run that produced it); agent scope or wider becomes
a candidate pending evaluation.
rationale: Option<String>Why the correction is right, when the corrector said. Optional; the attribution is not.
Implementations§
Source§impl Correction
impl Correction
The derived records’ author: human:{author}.
Sourcepub fn attribution(&self) -> String
pub fn attribution(&self) -> String
The attribution string the design spells: human:{author} via correction:{id}. The derived record carries it structurally (author
plus evidence); this is the human-facing form, for responses and
audit output.
Sourcepub fn evidence(&self) -> MemoryEvidence
pub fn evidence(&self) -> MemoryEvidence
The evidence every derived record carries: the correction id, plus the run linkage when the target is a journaled run event.
Sourcepub fn is_candidate(&self) -> bool
pub fn is_candidate(&self) -> bool
The scope-decides-the-path rule: true when this correction’s
derived records are candidates pending evaluation (agent scope or
wider), false at run scope, where a correction is adopted directly
— it affects only the run that produced it.
Trait Implementations§
Source§impl Clone for Correction
impl Clone for Correction
Source§fn clone(&self) -> Correction
fn clone(&self) -> Correction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more