pub struct ExecutionStageGuard<'a> { /* private fields */ }Expand description
One original stage’s fixed layout, retained under both workflow and child exclusion.
Existing attempt journals remain the only spending owner. create supplies no
journals; prepare creates the complete original set. Reopening never creates,
resets or reconstructs journals. Integrations
retain exact learned inputs, authenticate their relation to settled originals,
and qualify fresh authority, command custody and proof of no previous dispatch.
Implementations§
Source§impl<'a> ExecutionStageGuard<'a>
impl<'a> ExecutionStageGuard<'a>
Sourcepub fn prepare(
workflow_layout: &'a BackupLayoutGuard,
binding: ExecutionStageBindingRecord,
plan: OperationPlanRecord,
) -> Result<Self, ExecutionStagePreparationError>
pub fn prepare( workflow_layout: &'a BackupLayoutGuard, binding: ExecutionStageBindingRecord, plan: OperationPlanRecord, ) -> Result<Self, ExecutionStagePreparationError>
Durably prepare a new stage and its complete original attempt-journal set.
Reuses create-only stage admission and the existing journal owner, taking one journal lock at a time. Every original authority is derived before stage allocation. No reservation, receipt, backend call or fresh dispatch authority follows. Hold no other attempt guards during preparation.
Partial preparation remains occupied and is never repaired by retrying. Reopen only retained originals and require complete execution admission; missing journals never mean unused allowance. A lost successful response can reopen the complete exact stage without creating another journal.
§Errors
Rejects invalid originals, occupied stages, journal contention and failed durable publication, preserving all partial records and original limits.
Sourcepub fn create(
workflow_layout: &'a BackupLayoutGuard,
binding: ExecutionStageBindingRecord,
plan: OperationPlanRecord,
) -> Result<Self, ExecutionWorkflowPersistenceError>
pub fn create( workflow_layout: &'a BackupLayoutGuard, binding: ExecutionStageBindingRecord, plan: OperationPlanRecord, ) -> Result<Self, ExecutionWorkflowPersistenceError>
Create a fixed private stage directory, exact child plan and immutable binding.
Every original predecessor and ancestor needs its exact retained binding, plan and complete chronological Applied settlement. The directory is create-only: occupied or interrupted preparation is retained and cannot be recreated with another plan. No journal or backend effect occurs before return.
§Errors
Rejects changed allocation, unavailable prerequisites, occupied stages and IO failures.
Sourcepub fn open(
workflow_layout: &'a BackupLayoutGuard,
expected_workflow: &ArtifactChecksumRecord,
sequence: u64,
expected_binding: &ArtifactChecksumRecord,
) -> Result<Self, ExecutionWorkflowPersistenceError>
pub fn open( workflow_layout: &'a BackupLayoutGuard, expected_workflow: &ArtifactChecksumRecord, sequence: u64, expected_binding: &ArtifactChecksumRecord, ) -> Result<Self, ExecutionWorkflowPersistenceError>
Reopen an exact fixed stage without allocation, repair or journal creation.
Lost successful creation responses reconcile here. A partially prepared directory without both immutable records rejects and remains retained. Missing pending journals cannot be treated as unused allowance by the existing execution-progress or settlement owners.
§Errors
Rejects missing/changed original records, prerequisite history or ownership failures.
Sourcepub const fn plan(&self) -> &OperationPlanRecord
pub const fn plan(&self) -> &OperationPlanRecord
Read the exact bound original child plan; no fresh permission is implied.
Sourcepub const fn binding(&self) -> &ExecutionStageBindingRecord
pub const fn binding(&self) -> &ExecutionStageBindingRecord
Read the immutable original stage and predecessor commitments.
Sourcepub fn layout(
&self,
) -> Result<&BackupLayoutGuard, ExecutionWorkflowPersistenceError>
pub fn layout( &self, ) -> Result<&BackupLayoutGuard, ExecutionWorkflowPersistenceError>
Re-admit both original records and expose the existing journal/layout owner.
Callers must use complete original journal admission for resume. Never create a missing journal on resume or substitute a freshly derived plan.
§Errors
Rejects changed roots, retained records or any ancestor settlement history.