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: ReleaseModelRelease trigger model.
layout: ReleaseLayoutRepository 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§
impl Eq for Release
impl StructuralPartialEq for Release
Auto Trait Implementations§
impl Freeze for Release
impl RefUnwindSafe for Release
impl Send for Release
impl Sync for Release
impl Unpin for Release
impl UnsafeUnpin for Release
impl UnwindSafe for Release
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.