Skip to main content

Release

Struct Release 

Source
pub struct Release {
    pub model: ReleaseModel,
    pub layout: ReleaseLayout,
    pub bump_hook: Option<String>,
}
Expand description

The release block of the contract (SCHEMA.md §1).

Fields§

§model: ReleaseModel

Release trigger model.

§layout: ReleaseLayout

Repository release layout.

§bump_hook: Option<String>

An optional repo-provided command the engine runs in the clean checkout during the engine-owned version-bump phase, after the version edits and before the bump commit (release-rust-workspace-multicrate facet 3). Its purpose is to regenerate version-embedding artifacts — the canonical case is a repo whose test snapshots embed the version (insta envelope_snapshots__version_*), which go stale on a bump and red CI unless regenerated against the new version. Keeping it a declared command keeps the engine out of per-repo test-harness specifics: the engine folds the hook’s file changes into the bump commit and fails closed if the hook exits non-zero. null (absent) = no hook, the default.

Security (trust boundary). A declared hook is arbitrary code the engine runs during a release, with whatever environment the cut carries (potentially registry-publish credentials), before the publish barrier. It is equivalent in trust to a build.rs / a test the release already runs, but it lives in the contract, which may be reviewed less carefully than Rust source — so a malicious bump_hook is a supply-chain surface. The engine surfaces the hook verbatim as a plan-time warning so an approver sees exactly what will run, and the executor’s invocation contract (shell vs argv, working directory, timeout, environment/secret policy, permitted file changes) is specified where execution is wired — until then no hook is ever run (release cut refuses a bump plan).

A purely additive optional field: it is omitted from the canonical JSON when absent (skip_serializing_if), so a contract that declares no hook serializes byte-for-byte as before and its plan_id is unchanged. By the migration rule an additive optional field does not bump schema_version; and this codebase parses the contract through a hand-written normalizer (no serde Deserialize), so there is no missing-field deser hazard for older readers, which in any case lack --bump and so never act on the hook.

Trait Implementations§

Source§

impl Clone for Release

Source§

fn clone(&self) -> Release

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 Release

Source§

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

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

impl Eq for Release

Source§

impl PartialEq for Release

Source§

fn eq(&self, other: &Release) -> 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 Release

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 Release

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.