pub struct RoutingReceipt {
pub schema_version: String,
pub algorithm_version: String,
pub plan_hash: String,
pub step: u64,
pub workspace_generation: u64,
pub state_binding: String,
pub side_effect_watermark: u64,
pub attempts: Vec<RoutingAttemptReceipt>,
pub selected_candidate_id: Option<String>,
pub outcome: RoutingReceiptOutcome,
}Expand description
Deterministic execution receipt bound to exactly one routing plan.
Fields§
§schema_version: StringSchema version enforced against SCHEMA_VERSION.
algorithm_version: StringAlgorithm version enforced against ROUTING_ALGORITHM_VERSION.
plan_hash: StringContent-addressed digest of the bound RoutingPlan.
step: u64Monotonic step counter matching the plan bindings.
workspace_generation: u64Monotonic workspace generation matching the plan bindings.
state_binding: StringState binding matching the plan bindings.
side_effect_watermark: u64Side-effect watermark matching the plan bindings.
attempts: Vec<RoutingAttemptReceipt>Provider attempts in exact execution order.
selected_candidate_id: Option<String>The ID of the candidate that succeeded, when outcome is Selected.
outcome: RoutingReceiptOutcomeTerminal reducer state for the step.
Implementations§
Source§impl RoutingReceipt
impl RoutingReceipt
Sourcepub fn new(
plan: &RoutingPlan,
attempts: Vec<RoutingAttemptReceipt>,
selected_candidate_id: Option<String>,
outcome: RoutingReceiptOutcome,
) -> Result<Self, RoutingError>
pub fn new( plan: &RoutingPlan, attempts: Vec<RoutingAttemptReceipt>, selected_candidate_id: Option<String>, outcome: RoutingReceiptOutcome, ) -> Result<Self, RoutingError>
Constructs a receipt, validates it against the plan, and verifies all invariants.
Sourcepub fn validate(&self, plan: &RoutingPlan) -> Result<(), RoutingError>
pub fn validate(&self, plan: &RoutingPlan) -> Result<(), RoutingError>
Validates schema, algorithm, plan binding, attempt sequence, and outcome consistency.
Sourcepub fn digest(&self, plan: &RoutingPlan) -> Result<String, RoutingError>
pub fn digest(&self, plan: &RoutingPlan) -> Result<String, RoutingError>
Computes a canonical BLAKE3 digest over the validated receipt JSON.
Trait Implementations§
Source§impl Clone for RoutingReceipt
impl Clone for RoutingReceipt
Source§fn clone(&self) -> RoutingReceipt
fn clone(&self) -> RoutingReceipt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more