pub struct Branch {
pub name: String,
pub parent: Option<String>,
pub head_op: Option<OpId>,
pub predicate: Option<Value>,
pub merges: Vec<MergeRecord>,
pub created_at: u64,
pub last_gate_checkpoint: Option<OpId>,
}Fields§
§name: String§parent: Option<String>§head_op: Option<OpId>Op DAG head. None means the branch has never had an op
applied (empty branch) or it’s a predicate-defined branch
where the head is computed lazily from predicate.
predicate: Option<Value>Predicate over the op log (#133). When Some, the branch is
a saved query rather than a snapshot — head_op is the
optional materialization cache. The predicate’s JSON shape
matches lex_vcs::Predicate::to_value().
merges: Vec<MergeRecord>Append-only journal of merges committed into this branch.
created_at: u64§last_gate_checkpoint: Option<OpId>Last op_id through which the producer-block gate (#248) has
verified the branch’s history (#256). When advancing from
head_op to a new tip, the gate walks ops in
(last_gate_checkpoint .. head_op] and runs the
producer-block check on each ancestor’s attestable stages —
not just the new op. Once that walk passes, the checkpoint
advances.
Invalidated (set to None) when lex attest retro-block
lands a new ProducerBlock attestation, forcing the next
advance to re-walk from genesis once. Steady-state advances
are O(new ops) because the previous advance already
covered everything up through last_gate_checkpoint.
Pre-#256 branch files have no last_gate_checkpoint field;
serde defaults to None, which forces a one-time full walk
on next advance. Same backward-compat trick intent_id
(#131) used.