pub struct ProvisionalBranch {
pub branch_id: String,
pub session_id: String,
pub node_id: String,
pub parent_node_id: String,
pub state: ProvisionalBranchState,
pub parent_seal_hash: Option<[u8; 32]>,
pub sandbox_dir: Option<String>,
pub created_at: i64,
pub updated_at: i64,
}Expand description
PSP-5 Phase 6: Provisional branch tracking speculative child work.
Created before speculative generation begins so the runtime can track branch lifecycle, enforce seal prerequisites, and flush on parent failure.
Fields§
§branch_id: StringUnique branch identifier.
session_id: StringSession this branch belongs to.
node_id: StringThe node executing speculatively in this branch.
parent_node_id: StringParent node whose interface this branch depends on.
state: ProvisionalBranchStateCurrent branch state.
parent_seal_hash: Option<[u8; 32]>SHA-256 hash of the parent interface seal this branch depends on.
None if the parent has not yet produced a seal.
sandbox_dir: Option<String>Sandbox workspace directory (if verification ran in sandbox).
created_at: i64Timestamp of branch creation (epoch seconds).
updated_at: i64Timestamp of last state transition (epoch seconds).
Implementations§
Source§impl ProvisionalBranch
impl ProvisionalBranch
Sourcepub fn new(
branch_id: impl Into<String>,
session_id: impl Into<String>,
node_id: impl Into<String>,
parent_node_id: impl Into<String>,
) -> Self
pub fn new( branch_id: impl Into<String>, session_id: impl Into<String>, node_id: impl Into<String>, parent_node_id: impl Into<String>, ) -> Self
Create a new active provisional branch.
Sourcepub fn is_live(&self) -> bool
pub fn is_live(&self) -> bool
Whether this branch is still eligible for merge (active or sealed).
Sourcepub fn is_flushed(&self) -> bool
pub fn is_flushed(&self) -> bool
Whether this branch has been discarded.
Trait Implementations§
Source§impl Clone for ProvisionalBranch
impl Clone for ProvisionalBranch
Source§fn clone(&self) -> ProvisionalBranch
fn clone(&self) -> ProvisionalBranch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more