pub struct Distilled {
pub episode: String,
pub corrections: Vec<Correction>,
}Expand description
What one session yielded for the graph.
Fields§
§episode: StringEmpty when the model skipped: a session can be worth no episode and
still carry a correction, which is why this is not an Option.
corrections: Vec<Correction>Implementations§
Source§impl Distilled
impl Distilled
Sourcepub fn body(&self, taint: Option<Taint>) -> Option<String>
pub fn body(&self, taint: Option<Taint>) -> Option<String>
The body to push, or None when this session has nothing that may
leave it.
A corrections-only session has no episode text, but pkg requires a non-empty body — pushing “” would bail, leave the session unledgered, and re-distill it every night forever. So the carrier says what happened, which is honest evidence in its own right.
It takes the taint, not a set of corrections, and computes the
sendable set itself. An earlier version took &[Correction],
which made out.body(&out.corrections) compile — the obvious call,
and one that launders a withheld claim into episode prose that
pkg’s extractor mines into candidates anyway. A gate that the
caller can bypass by passing the wrong argument is a convention,
not a boundary; there is deliberately no argument here that
produces the withheld prose.
None also removes the degenerate case: a corrections-only
session on an untrusted timeline used to render “The user
corrected 0 things the knowledge graph had wrong: .” and relied on
the caller skipping it.
Sourcepub fn is_corrections_only(&self, taint: Option<Taint>) -> bool
pub fn is_corrections_only(&self, taint: Option<Taint>) -> bool
True when the only reason to push is repairs that may actually be sent from this timeline.