Skip to main content

ContextOptions

Struct ContextOptions 

Source
pub struct ContextOptions {
Show 29 fields pub snapshot: bool, pub nightly: bool, pub dry_run: bool, pub quiet: bool, pub verbose: bool, pub debug: bool, pub skip_stages: Vec<String>, pub selected_crates: Vec<String>, pub token: Option<String>, pub parallelism: usize, pub single_target: Option<String>, pub release_notes_path: Option<PathBuf>, pub fail_fast: bool, pub partial_target: Option<PartialTarget>, pub merge: bool, pub publish_only: bool, pub project_root: Option<PathBuf>, pub strict: bool, pub resume_release: bool, pub replace_existing_artifacts: bool, pub skip_post_publish_poll: bool, pub gate_submitter: Option<bool>, pub rollback_mode: Option<RollbackMode>, pub simulate_failure_publishers: Vec<String>, pub rollback_only: bool, pub allow_rerun: bool, pub from_run: Option<String>, pub runtime_nondeterministic_allowlist: Vec<(String, String)>, pub summary_json_path: Option<PathBuf>,
}

Fields§

§snapshot: bool§nightly: bool§dry_run: bool§quiet: bool§verbose: bool§debug: bool§skip_stages: Vec<String>§selected_crates: Vec<String>§token: Option<String>§parallelism: usize

Maximum number of parallel build jobs (minimum 1).

§single_target: Option<String>

When set, build only for this single host target triple.

§release_notes_path: Option<PathBuf>

Path to a custom release notes file (overrides changelog).

§fail_fast: bool

When true, abort immediately on first error during publishing.

§partial_target: Option<PartialTarget>

Partial build target for split/merge mode. When set, the build stage filters targets to only those matching this partial target.

§merge: bool

When true, running with --merge flag (merging artifacts from split builds).

§publish_only: bool

--publish-only: load artifacts from a preserved dist (written by anodize check determinism --preserve-dist=...) and run only the sign + publish pipeline. The CLI dispatcher uses this flag in setup_env to defer the GitHub-token check to publish_only::preflight_credentials, which owns the combined token + sign-key check and bails fail-closed on missing values. Without this gate, setup_env’s token check would fire FIRST and pre-empt publish-only’s own preflight (which validates BOTH token AND sign key in one shot).

§project_root: Option<PathBuf>

Explicit project root directory. When set, stages use this instead of discovering the repo root via git rev-parse --show-toplevel.

§strict: bool

Strict mode: configured features that would silently skip become errors.

§resume_release: bool

--resume-release: opt-in to continue into a release left over from a prior failed attempt. Bypasses the leftover-assets pre-check that bails when an existing release already has assets and replace_existing_artifacts is false.

§replace_existing_artifacts: bool

--replace-existing: CLI override that forces release.replace_existing_artifacts: true regardless of config. The release stage ORs this with the config value.

§skip_post_publish_poll: bool

--no-post-publish-poll: skip post-publish polling for the chocolatey moderation queue and the winget PR validation pipeline. When true, the polling runner emits PostPublishStatus::NotPolled (pending immediately) for every publisher rather than waiting on a terminal state. Lets CI users with no patience for long-running waits opt out without scattering post_publish_poll.enabled: false across every publisher block.

§gate_submitter: Option<bool>

Whether the publisher dispatcher gates irreversible Submitter publishers (chocolatey, winget, AUR-source, krew, snapcraft) on the success of every required Assets/Manager publisher that ran before them. None defaults to Some(true) (gate on). The CLI flag --no-gate-submitter flips this to Some(false). See stage-publish::dispatch::DispatchOptions::gate_submitter for the gating mechanics.

§rollback_mode: Option<RollbackMode>

--rollback=<none|best-effort>: post-publish rollback policy. None means “resolve from preflight state at dispatch time” (best-effort when preflight ran clean, none otherwise with a warn). Consumed by the rollback-dispatch task.

§simulate_failure_publishers: Vec<String>

--simulate-failure=<publisher> (repeatable, hidden, env-gated behind ANODIZE_TEST_HARNESS=1): names of publishers whose run() should be skipped and a synthetic Failed("simulated failure: <name>") recorded in the report instead. Lets the failure-mode test harness exercise gate / rollback / report paths deterministically without monkey-patching production publisher code.

§rollback_only: bool

--rollback-only: skip publish; re-attempt rollback from a prior run report. Requires from_run to identify which prior run’s report.json to load. The actual replay logic lands in a follow-up task; this field is plumbed so the flag is visible in --help today.

§allow_rerun: bool

--allow-rerun: force PublishStage::run to proceed even when a prior report.json exists for the current run_id. The default (false) refuses re-runs to prevent PR-based publishers (homebrew / scoop / nix / krew / MCP) from duplicating their pull requests against the same tag.

Operators recovering from a partial failure should prefer --rollback-only --from-run=<id> (which has its own idempotency guard via dist/run-<id>/rollback.json). The rerun flag is an escape hatch for advanced cases where the operator has manually verified no duplicate-publish risk exists.

Audit ref: 2026-05-15 release-resilience-review finding I4.

§from_run: Option<String>

--from-run=<id>: prior run id whose report.json to load when running in --rollback-only mode. clap enforces the requires = "rollback_only" relationship at parse time.

§runtime_nondeterministic_allowlist: Vec<(String, String)>

--allow-nondeterministic <name>=<reason> (repeatable): runtime non-determinism opt-outs for specific artifacts. The determinism stage suppresses its non-determinism error for any matching artifact name, recording the supplied reason in the report. Mutually exclusive with --strict at the clap layer.

§summary_json_path: Option<PathBuf>

--summary-json=<path>: when set, the per-publisher run summary is written to this path. Consumed by the run-summary task.

Trait Implementations§

Source§

impl Default for ContextOptions

Source§

fn default() -> Self

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<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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: 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: 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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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