Skip to main content

ExperimentEvidenceBundle

Struct ExperimentEvidenceBundle 

Source
pub struct ExperimentEvidenceBundle {
Show 36 fields pub bundle_id: String, pub candidate_id: String, pub eval_id: String, pub version_id: String, pub supersedes_claim_version_id: Option<ClaimVersionId>, pub relation_lineage_hints: RelationLineageHints, pub scores: ScoreVector, pub hypotheses: Vec<CausalHypothesis>, pub verification: Option<VerificationPlan>, pub trace_id: Option<String>, pub experiment_diff: Option<ExperimentDiff>, pub attribution_json: Option<String>, pub assessment: Option<EvidenceAssessment>, pub warnings: Vec<String>, pub created_at: String, pub run_id: Option<String>, pub attempt_id: Option<String>, pub causal_question: Option<String>, pub unit_definition: Option<String>, pub bundle_scope: Option<BundleScope>, pub pair_comparability: Option<PairComparability>, pub claim_strength: ClaimStrength, pub identification_rationale: Option<String>, pub known_threats: Vec<String>, pub patch_hash: Option<String>, pub treatment: Option<Treatment>, pub outcome: Option<String>, pub covariates: Option<Covariates>, pub promotion_state: Option<PromotionState>, pub primary_effect: Option<TypedLocatedEffect>, pub all_effects: Vec<TypedLocatedEffect>, pub hypothesis_edges: Vec<HypothesisEdge>, pub receipts: Vec<ReceiptRef>, pub verification_trials: Vec<VerificationTrial>, pub refutation_artifacts: Vec<RefutationArtifact>, pub sealed: bool,
}
Expand description

A bundle of evidence collected during a forge evaluation run.

One ExperimentEvidenceBundle = one paired experiment on one fixed workload slice. One bundle may contain multiple effects but names exactly one primary effect. Claim strength for Phase 5 is always ProvisionalSinglePair.

semantic_memory_forge::EvidenceBundle is the authoritative cross-crate evidence contract. This local type is an authoring wrapper that carries forge-engine-only working fields and round-trips them explicitly through the canonical bundle metadata under [LOCAL_AUTHORING_METADATA_KEY].

Fields§

§bundle_id: String

Unique identifier for this bundle.

§candidate_id: String

The candidate that produced this evidence.

§eval_id: String

Eval run that generated the evidence.

§version_id: String

Version of the algebra spec used.

§supersedes_claim_version_id: Option<ClaimVersionId>

Real prior claim-lineage version when known.

This is optional and carried through to the export envelope so that downstream projection imports can preserve version-aware supersession.

§relation_lineage_hints: RelationLineageHints

Explicit relation-version lineage hints for exportable relations, when known.

These hints are advisory only. They do not mint lineage, and export leaves supersedes_relation_version_id unset when no exact hint is present.

§scores: ScoreVector

Computed scores.

§hypotheses: Vec<CausalHypothesis>

Causal hypotheses derived from this run (legacy field, prefer hypothesis_edges).

§verification: Option<VerificationPlan>

Verification plan for follow-up validation.

§trace_id: Option<String>

Trace ID for cross-crate correlation.

§experiment_diff: Option<ExperimentDiff>

Typed experiment diff (baseline vs patched), if from a paired experiment.

§attribution_json: Option<String>

Attribution result from CEA, if available.

§assessment: Option<EvidenceAssessment>

Deterministic evidence assessment.

§warnings: Vec<String>

Warnings generated during evidence collection.

§created_at: String

When this bundle was recorded by Forge.

§run_id: Option<String>

Forge domain ID for the experiment run.

§attempt_id: Option<String>

Forge domain ID for the patch attempt.

§causal_question: Option<String>

The causal question this bundle answers.

§unit_definition: Option<String>

Explicit description of the unit of observation.

§bundle_scope: Option<BundleScope>

Scope of this bundle.

§pair_comparability: Option<PairComparability>

Explicit paired comparability verdict when the source captured it.

§claim_strength: ClaimStrength

How strong a claim this bundle makes.

§identification_rationale: Option<String>

Why we think confounding is controlled.

§known_threats: Vec<String>

Known threats to validity.

§patch_hash: Option<String>

Content hash of the patch.

§treatment: Option<Treatment>

The treatment applied.

§outcome: Option<String>

Outcome summary.

§covariates: Option<Covariates>

Measured covariates.

§promotion_state: Option<PromotionState>

Promotion state for the claim represented by this bundle, when known.

§primary_effect: Option<TypedLocatedEffect>

The primary effect attributed to the patch.

§all_effects: Vec<TypedLocatedEffect>

All effects observed in the experiment.

§hypothesis_edges: Vec<HypothesisEdge>

Typed hypothesis edges (Phase 5 edge model).

§receipts: Vec<ReceiptRef>

Receipts proving artifact integrity.

§verification_trials: Vec<VerificationTrial>

Canonical per-side verification trials for this causal claim.

§refutation_artifacts: Vec<RefutationArtifact>

Refutation artifacts generated by verification infrastructure.

§sealed: bool

Whether this bundle is sealed (immutable after creation).

Implementations§

Source§

impl ExperimentEvidenceBundle

Source

pub fn seal(&mut self) -> ForgeResult<()>

Seal the bundle, making it logically immutable. Returns an error if the bundle is already sealed.

Source

pub fn check_not_sealed(&self) -> ForgeResult<()>

Returns an error if the bundle is sealed and mutation is attempted.

Source

pub fn to_canonical_evidence_bundle(&self) -> EvidenceBundle

Project this local bundle into the canonical Forge evidence contract.

The canonical semantic_memory_forge::EvidenceBundle remains the authoritative cross-crate contract. Local forge-engine-only authoring fields are preserved explicitly inside canonical metadata rather than becoming a second drifting wire contract.

Source

pub fn from_canonical_evidence_bundle( canonical: &EvidenceBundle, ) -> ForgeResult<Self>

Rebuild the local authoring wrapper from the canonical Forge evidence contract.

The canonical bundle is authoritative. When local authoring metadata is present, it is used only to recover forge-engine-specific working fields that are intentionally outside the canonical contract.

Source

pub fn render_causal_question( patch_summary: &str, outcome_summary: &str, workload_id: &str, scope_summary: &str, ) -> String

Render the causal question for this bundle.

Source

pub fn superseded_effect_relation_version_id( &self, source: EffectRelationLineageSource, effect: &TypedLocatedEffect, ) -> Option<RelationVersionId>

Return the prior relation version for an effect-derived export relation, when known.

Source

pub fn superseded_hypothesis_relation_version_id( &self, edge: &HypothesisEdge, ) -> Option<RelationVersionId>

Return the prior relation version for a hypothesis-edge export relation, when known.

Source

pub fn superseded_verification_trial_relation_version_id( &self, trial: &VerificationTrial, ) -> Option<RelationVersionId>

Return the prior relation version for a verification-trial export relation, when known.

Source

pub fn superseded_refutation_relation_version_id( &self, artifact: &RefutationArtifact, ) -> Option<RelationVersionId>

Return the prior relation version for a refutation-artifact export relation, when known.

Source

pub fn to_episode_meta(&self) -> Value

Convert the bundle into episode metadata suitable for semantic-memory storage.

Source

pub fn to_episode_content(&self) -> String

Convert the bundle into episode content text for embedding.

Includes: patch summary, primary causal question, primary effect summary, key covariates, claim strength, and verification recommendations. Does NOT include: giant raw logs, unstable formatting, or missing identifiers.

Trait Implementations§

Source§

impl Clone for ExperimentEvidenceBundle

Source§

fn clone(&self) -> ExperimentEvidenceBundle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExperimentEvidenceBundle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExperimentEvidenceBundle

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ExperimentEvidenceBundle

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more