Skip to main content

Project

Struct Project 

Source
pub struct Project {
Show 25 fields pub vela_version: String, pub schema: String, pub frontier_id: Option<String>, pub project: ProjectMeta, pub stats: ProjectStats, pub findings: Vec<FindingBundle>, pub sources: Vec<SourceRecord>, pub evidence_atoms: Vec<EvidenceAtom>, pub condition_records: Vec<ConditionRecord>, pub review_events: Vec<ReviewEvent>, pub confidence_updates: Vec<ConfidenceUpdate>, pub events: Vec<StateEvent>, pub proposals: Vec<StateProposal>, pub proof_state: ProofState, pub signatures: Vec<SignedEnvelope>, pub actors: Vec<ActorRecord>, pub replications: Vec<Replication>, pub datasets: Vec<Dataset>, pub code_artifacts: Vec<CodeArtifact>, pub artifacts: Vec<Artifact>, pub predictions: Vec<Prediction>, pub resolutions: Vec<Resolution>, pub peers: Vec<PeerHub>, pub trajectories: Vec<Trajectory>, pub negative_results: Vec<NegativeResult>,
}

Fields§

§vela_version: String§schema: String§frontier_id: Option<String>

Stable Vela-addressable frontier ID, derived from a frontier.created genesis event hash. Optional for backward compatibility with v0.2 frontiers; new v0.3 frontiers populate it on assemble().

§project: ProjectMeta§stats: ProjectStats§findings: Vec<FindingBundle>§sources: Vec<SourceRecord>

Source artifacts that produced evidence-bearing units.

§evidence_atoms: Vec<EvidenceAtom>

Materialized source-grounded evidence units linked to findings.

§condition_records: Vec<ConditionRecord>

Materialized condition boundaries used to avoid claim overgeneralization.

§review_events: Vec<ReviewEvent>

Append-only log of review events (content-addressed).

§confidence_updates: Vec<ConfidenceUpdate>

Append-only log of confidence updates.

§events: Vec<StateEvent>

Canonical append-only event log for replayable frontier state.

§proposals: Vec<StateProposal>

Portable pending/applied proposal records for proposal-first writes.

§proof_state: ProofState

Frontier-local proof freshness projection.

§signatures: Vec<SignedEnvelope>

Cryptographic signatures for findings (Ed25519).

§actors: Vec<ActorRecord>

Registered actor identities, mapping a stable actor.id to an Ed25519 public key. Phase M (v0.4): once an actor is registered, any canonical event referencing that actor.id under --strict must carry a verifiable Ed25519 signature.

§replications: Vec<Replication>

v0.32: Replication attempts as first-class kernel objects. Each Replication is content-addressed (vrep_<hash>) over its target finding, attempting actor, conditions, and outcome. Replaces the prior scalar pattern (Evidence.replicated: bool + Evidence.replication_count: u32) which couldn’t represent independent attempts under different conditions. The legacy scalar fields are preserved on Evidence for backward compatibility; v0.32+ frontiers can derive them from this collection.

§datasets: Vec<Dataset>

v0.33: Datasets as first-class kernel objects. A vd_<hash> captures a versioned, content-addressed reference to data that anchors empirical claims. Distinct from Provenance (which describes the paper) — a single paper may publish multiple datasets, and a single dataset may be reused across many papers.

§code_artifacts: Vec<CodeArtifact>

v0.33: Code artifacts as first-class kernel objects. A vc_<hash> is a content-addressed pointer at a specific region of source code at a specific git commit. Claims can reference the code that produced them, not only a repository name in prose.

§artifacts: Vec<Artifact>

Generic content-addressed artifacts: protocols, trial registry records, supplements, notebooks, source files, and dataset manifests that need a durable byte or pointer commitment.

§predictions: Vec<Prediction>

v0.34: Predictions as first-class kernel objects. A vpred_<hash> is a falsifiable claim about a future observation, scoped to existing findings and tied to a registered actor. Calibration scoring runs over the resolved subset.

§resolutions: Vec<Resolution>

v0.34: Resolutions as first-class kernel objects. A vres_<hash> closes out a Prediction by recording what actually happened. Together with Project.predictions, this is the kernel’s epistemic accountability ledger.

§peers: Vec<PeerHub>

v0.39: Federation peer registry. Each PeerHub declares another hub this frontier knows about — id, HTTPS URL, and the Ed25519 pubkey that peer signs their manifests with. Adding a peer doesn’t yet trust their state; it just establishes who we know about. The actual sync runtime ships in v0.39.1+.

§trajectories: Vec<Trajectory>

v0.50: Trajectories as first-class kernel objects. A vtr_<hash> records the ordered search path that produced (or did not produce) a finding — hypotheses considered, branches tried, branches ruled out and why. The eighth essay primitive, “deposited last and most thinly because labs have real reasons not to expose dead ends,” but represented structurally so an agent that does choose to deposit can prevent the next agent from re-deriving a ruled-out branch.

§negative_results: Vec<NegativeResult>

v0.49: NegativeResults as first-class kernel objects. A vnr_<hash> records an experiment or trial that did not support its hypothesis — registered-trial with power and effect-size bounds, or exploratory wet-lab dead end with the (reagent, condition, observed outcome) tuple. The substrate primitive that lets “absence of evidence” and “evidence of absence” round-trip distinctly through downstream confidence math instead of being flattened into a private “we tried that, it didn’t work.”

Implementations§

Source§

impl Project

Source

pub fn frontier_id(&self) -> String

Return the stable Vela-addressable frontier ID. Prefers the stored field; if absent, derives from the frontier.created genesis event in events[0]; if no genesis event is present, falls back to meta-derivation (legacy v0.3 frontiers).

Source

pub fn ensure_frontier_id(&mut self) -> String

Materialize the frontier_id field if absent. Idempotent.

Source

pub fn compute_confidence_for(&self, bundle: &FindingBundle) -> Confidence

v0.36.1: Compute frontier-epistemic confidence for a finding using the v0.32 Replication collection as the authoritative source. A failed replication subtracts from confidence; a successful one adds to it; partials half-add. This closes the long-standing “two sources of truth” between Evidence.replicated (the legacy scalar set when a finding was first asserted) and Project.replications (the kernel objects accumulated over time).

Falls back to the legacy scalar only when no Replication record targets this finding’s id — preserves behavior for unmigrated frontiers.

Source

pub fn cross_frontier_deps(&self) -> impl Iterator<Item = &ProjectDependency>

v0.8: iterate the cross-frontier dependencies (those with vfr_id set). Pre-v0.8 compile-time deps without vfr_id are filtered out.

Source

pub fn dep_for_vfr(&self, vfr_id: &str) -> Option<&ProjectDependency>

v0.8: look up the dependency record for a specific vfr_id. Returns None if no matching cross-frontier dep is declared.

Source

pub fn build_reverse_dep_index(&self) -> ReverseDepIndex

v0.49.3: build a reverse-dependency index from the forward links: Vec<Link> data on each finding. The forward direction (which findings does this finding depend on?) is O(1) per finding because it’s just f.links. The reverse direction (which findings depend on this finding?) previously required scanning every finding for every query — O(N×L). This index flips that to O(1) lookup once built.

Cost to build: O(N×L) one-time scan over all findings × links. At 48 findings × ~3 links each (the legacy BBB proof fixture), that’s ~150 hash-insert operations and microseconds. At 100K findings × 10 links, it’s still well under a second.

Used by retraction-impact queries (serve.rs), cascade computation, and any consumer that needs to walk the dependent graph rather than the dependency graph. The index is not serialized — it’s a derived structure that callers build when they need it and drop when they don’t.

Trait Implementations§

Source§

impl Debug for Project

Source§

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

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

impl<'de> Deserialize<'de> for Project

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 Project

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> 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: 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: 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, 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
Source§

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