Skip to main content

ResumeOptions

Struct ResumeOptions 

Source
pub struct ResumeOptions {
    pub stop: CancellationToken,
    pub stop_at: Option<String>,
    pub stop_after: Option<String>,
    pub platform: Option<String>,
    pub old_flow_ir: Option<FlowIR>,
    pub supervise: Option<SupervisePolicy>,
    pub vision: Option<Arc<dyn VisionVerifier>>,
    pub force_reexecute: Vec<String>,
    pub force_stale_writer: bool,
    pub allow_mutating_reexec: Vec<String>,
    pub clock: Option<Arc<dyn Fn() -> u64 + Send + Sync>>,
}
Expand description

Options of Runner::resume.

Fields§

§stop: CancellationToken

Cooperative stop token (see RunOptions::stop).

§stop_at: Option<String>

Breakpoint before a step instance’s entry (see RunOptions::stop_at); per segment, never persisted.

§stop_after: Option<String>

Breakpoint after a step instance’s exit (see RunOptions::stop_after); per segment, never persisted.

§platform: Option<String>

env.platform, when known.

§old_flow_ir: Option<FlowIR>

The FlowIR the run originally executed — optional, and worth supplying. Alignment reads the archived execution-time per-step hashes from the checkpoint’s StepRecords (harvested from stepEntered, spine §6.1 M1 note), so cross-IR resume works without it; supplying it additionally unlocks the preflight-only sub-domain comparison (07 §5.3 / 02 §12.3 ruling 6) — a judgeDirty step whose only change is preflight adopts its archived verdict outright instead of re-judging or re-executing. Verified against the checkpoint’s irHash (RunnerError::OldIrMismatch); a mismatch is a caller error, surfaced not ignored.

§supervise: Option<SupervisePolicy>

This segment’s supervision policy (R13, spine §6.9): recorded in runResumed.supervisePolicy (explicitly null when absent). Per segment, never inherited — an unset value means this segment runs unsupervised regardless of previous segments; a supervision request already pending still settles by its arbitrated response.

§vision: Option<Arc<dyn VisionVerifier>>

The vision verifier of this segment (see RunOptions::vision); None is stub-equivalent — vision tails degrade to unknown.

§force_reexecute: Vec<String>

Step ids the author FORCES back to execution this segment (07 §5.3, the CLI’s repeatable --force-reexecute <stepId>): each named step classifies effectDirty regardless of its hashes, so the resume point rolls back to the earliest of them and they re-run against the live world.

The escape hatch for a re-judge the author rejects — an offline re-judge that can only reach unknown because the archive lacks the observation channel the new assertion needs (「缺料 → unknown」), or an adopted result the author no longer trusts. It upgrades the CLASSIFICATION only: a forced step that is mutating and already effective still walks the 07 §5.4 gate and needs --allow-mutating-reexec besides — forcing says “run it again”, authorizing says “yes, even though the world holds its effect”. Like the authorization list it covers this resume only, and it is cross-IR vocabulary: a same-IR resume has no classification to upgrade.

§force_stale_writer: bool

Skip the per-run writer lease (07 §3.3 rule 5) for this segment — the CLI’s --force-stale-writer: the escape hatch for filesystems where flock lies (NFS/SMB). The segment then writes without any liveness claim; the caller vouches that no other writer is alive.

§allow_mutating_reexec: Vec<String>

Step ids the author explicitly authorized for mutating re-execution this segment (07 §5.4 step 2, the CLI’s repeatable --allow-mutating-reexec <stepId>).

Each id releases exactly one requiresConfirmation entry; there is no wildcard, and the authorization covers this resume only — nothing about it is persisted, so the next resume re-gates from scratch. An id naming no gated step is refused rather than ignored: silently accepting it would let an author believe they had cleared something they had not.

Releasing the gate does not skip the world check: the step still enters probing and evaluates its preflight (§5.4 step 3), which is what meets the residue of the earlier effect.

§clock: Option<Arc<dyn Fn() -> u64 + Send + Sync>>

Injectable wall clock (see RunOptions::clock).

Trait Implementations§

Source§

impl Default for ResumeOptions

Source§

fn default() -> ResumeOptions

Returns the “default value” for a type. 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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<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