Skip to main content

ReleasePlan

Struct ReleasePlan 

Source
pub struct ReleasePlan {
    pub plan_id: String,
    pub contract_schema_version: u32,
    pub head_sha: String,
    pub version: String,
    pub targets: Vec<PlanTarget>,
    pub phases: Vec<PlanPhase>,
    pub bump: Option<BumpPlan>,
    pub homebrew_tap: Option<String>,
    pub license: Option<String>,
}
Expand description

A sealed, content-addressed release plan — the artifact release plan emits and a human approves.

Every field except Self::plan_id is an input to the content address (plan_id is the SHA-256 digest over those inputs — plus the full normalized contract and a domain/seal-format tag — so it is derived, never authored, and is deliberately excluded from the hashed pre-image: a hash cannot cover itself). See crate::release::plan for the exact pre-image.

Fields§

§plan_id: String

The content-addressed plan id: a lowercase 64-character SHA-256 hex digest over the sealed pre-image (see crate::release::plan for exactly what is hashed). Stable — identical inputs always yield this same id; any change to a hashed input yields a different one. This is the token passed back as release cut --plan <plan_id>.

§contract_schema_version: u32

The OSS-RELEASE.md contract-document schema version this plan was sealed against (part of the content address). A schema bump between approval and execution is drift.

§head_sha: String

The git HEAD commit sha the plan was sealed against. A new commit between approval and execution is drift.

§version: String

The chosen release version (the human’s bump per design §3.4), supplied as a validated input to release plan. Sealed verbatim; changing it requires a new plan.

§targets: Vec<PlanTarget>

The ordered, concrete publish targets a cut would execute — one per configured ecosystem → package → registry, with null package names resolved from detected repo facts where possible.

§phases: Vec<PlanPhase>

The coordinator phase sequence a cut drives (ADR-0002 §2): dry-run-all → build-all → publish-all → tag → dist (the post-tag distribution finalize, e.g. the Homebrew formula whose tarball only exists after the tag). When the plan owns a version bump (Self::bump is Some), a leading PlanPhase::Bump is prepended — the engine sets the workspace version, rewrites the intra-workspace pins, refreshes the lockfile, finalizes the CHANGELOG, and runs any declared bump_hook before the crates are built, so the publish barrier builds the crates at the new version. The sequence is part of the content address (it authenticates the execution shape the approver saw — a plan with a bump phase can never be cut as one without); carried here so the sealed artifact is self-describing.

§bump: Option<BumpPlan>

The engine-owned version-bump phase, or null for a plan that publishes the version already in the tree (the default, --bump-less path — unchanged).

Present only when release plan --bump <level> computed a new version from the current manifest version + the semantic bump level (release-rust-workspace- multicrate facet 2). It carries the deterministic edit set the PlanPhase::Bump phase applies at cut time — the computed to_version, the intra-workspace =-pin rewrites, the CHANGELOG-finalize intent, and any contract-declared bump_hook — all folded into the content address, so approving a --bump minor plan and cutting it as --bump major (or without a bump) is drift, not a silent re-version.

Omitted from the canonical JSON when null (skip_serializing_if), so a --bump-less plan’s wire shape and plan_id are byte-for-byte what they were before this field existed — the --bump path is a strict, additive superset.

§homebrew_tap: Option<String>

The Homebrew tap repo (owner/repo) the cut’s generated formula is pushed to, or null when the contract configured none. Copied verbatim from the (already content-addressed) normalized contract’s distribution.homebrew_tap — carried on the plan, like Self::phases, only so the coordinator can hand it to the Homebrew adapter’s first-formula bootstrap without re-reading the contract. Being a copy of a value the pre-image already hashes, it changes no plan_id.

§license: Option<String>

The SPDX license expression the cut’s generated Homebrew formula records, copied from the normalized contract’s license. Carried for the same reason (and with the same content-address neutrality) as Self::homebrew_tap.

Trait Implementations§

Source§

impl Clone for ReleasePlan

Source§

fn clone(&self) -> ReleasePlan

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReleasePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ReleasePlan

Source§

impl PartialEq for ReleasePlan

Source§

fn eq(&self, other: &ReleasePlan) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ReleasePlan

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ReleasePlan

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.