pub struct CandidateWorkspace { /* private fields */ }Expand description
A node-local candidate filesystem. Model mutations never target the source
workspace directly; only promote copies touched paths.
Implementations§
Source§impl CandidateWorkspace
impl CandidateWorkspace
pub fn create( source_root: &Path, node_id: impl Into<String>, generation: u32, graph_revision: impl Into<String>, ) -> Result<Self>
pub fn create_with_policy( source_root: &Path, node_id: impl Into<String>, generation: u32, graph_revision: impl Into<String>, allow_unisolated_verifiers: bool, ) -> Result<Self>
Sourcepub fn set_tool_handlers(&mut self, handlers: Arc<CandidateHandlerRegistry>)
pub fn set_tool_handlers(&mut self, handlers: Arc<CandidateHandlerRegistry>)
Replace the execution plane. The composition root uses this to add registered tool families beyond the builtins.
pub fn overlay_root(&self) -> &Path
Sourcepub fn set_verifier_timeouts(&mut self, timeouts: VerifierTimeouts)
pub fn set_verifier_timeouts(&mut self, timeouts: VerifierTimeouts)
Configure per-stage governed verifier timeouts
([verification] stage_timeout_secs + overrides).
pub fn has_mutated(&self) -> bool
Sourcepub fn node_generation(&self) -> u32
pub fn node_generation(&self) -> u32
The node generation this candidate was created for.
Sourcepub fn touched_paths(&self) -> Vec<String>
pub fn touched_paths(&self) -> Vec<String>
Paths mutated by admitted effects — the only promotable set.
Sourcepub fn realized_diff(&self) -> Result<String>
pub fn realized_diff(&self) -> Result<String>
Diff the realized candidate against the source workspace. This is an observation for advisory/conjunctive validators; gating still measures the candidate filesystem directly.
Sourcepub fn promote(&self) -> Result<Vec<String>>
pub fn promote(&self) -> Result<Vec<String>>
Promote only paths mutated by admitted governed proposals. Checks and
writes share one directory descriptor per target (crate::promote),
so a path swapped underneath the workspace between validation and
rename is refused rather than followed.
Sourcepub fn restore_exported(&self, files: &[SeedFile]) -> Result<()>
pub fn restore_exported(&self, files: &[SeedFile]) -> Result<()>
Rebuild an accepted candidate state from a durable checkpoint’s exported files (mid-loop resume): each file is journaled and written into the overlay, and re-enters the mutated (promotable) set.
Sourcepub fn restore_seeded(&self, files: &[SeedFile]) -> Result<()>
pub fn restore_seeded(&self, files: &[SeedFile]) -> Result<()>
Seed inherited content (a staged predecessor’s contribution) without
marking it promotable: files are journaled and tracked with their
pre-images (promotion overwrite-protection intact), but they enter
mutated_paths only when this node’s own admitted effects touch
them — so a downstream export is exactly its own work, never a
re-export of everything it inherited (PSP-10 system 22).
Trait Implementations§
Source§impl Debug for CandidateWorkspace
impl Debug for CandidateWorkspace
Source§impl EffectExecutor for CandidateWorkspace
impl EffectExecutor for CandidateWorkspace
Source§fn checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<CandidateCheckpoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<CandidateCheckpoint>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn apply<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 ProviderToolCall,
entry: &'life2 ToolEntry,
) -> Pin<Box<dyn Future<Output = Result<EffectOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn restore<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 CandidateCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn restore<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint: &'life1 CandidateCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn state_witness<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CandidateStateWitness>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn state_witness<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CandidateStateWitness>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn export_accepted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SeedFile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn export_accepted<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<SeedFile>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
None = deleted), for durable mid-loop checkpoints. The default is
empty: fixtures without a filesystem have nothing durable to export.Auto Trait Implementations§
impl !Freeze for CandidateWorkspace
impl !RefUnwindSafe for CandidateWorkspace
impl Send for CandidateWorkspace
impl Sync for CandidateWorkspace
impl Unpin for CandidateWorkspace
impl UnsafeUnpin for CandidateWorkspace
impl !UnwindSafe for CandidateWorkspace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.