pub struct JournalShadowSource { /* private fields */ }Expand description
One source run’s journal, indexed as the recorded world a shadow run
serves refused effects from — the crate::effects::ShadowOutcomeSource
over the Flight Recorder’s own evidence.
The index is per-tool, in sequence order: every recorded
RunEventKind::ToolCall queues its request hash and recorded output
under the tool’s name. Serving pops the front of the tool’s queue
and only when the live request hashes to the same value — the hybrid
rule applied to ordering: the shadow serves the recorded outcome of
exactly the call the source made next under that tool, never a later
one and never a different argument set. A call the recorded world
never saw, or saw in a different order, is a divergence and answers
None.
After the run, JournalShadowSource::unrequested names the tools
whose recorded calls the shadow never made — divergence in the other
direction, journaled into the shadow’s verdict.
Implementations§
Source§impl JournalShadowSource
impl JournalShadowSource
Sourcepub fn new(snapshot: &JournalSnapshot) -> Self
pub fn new(snapshot: &JournalSnapshot) -> Self
Index a recorded run’s journal for shadow serving. Events whose payloads the snapshot cannot resolve (externalized artifact references) are skipped rather than guessed at: an unresolvable recorded call is one the shadow cannot serve, and serving it anyway would fabricate evidence.
Sourcepub fn unrequested(&self) -> Vec<String>
pub fn unrequested(&self) -> Vec<String>
The tools holding recorded calls no shadow requested, sorted. Called once the shadow’s run has ended — while it runs, a non-empty queue is simply the recorded future.