Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
Show 13 variants RunCreated { run_id: String, plan_id: String, version: String, targets: Vec<String>, }, PhaseEntered { phase: Phase, }, PhaseCompleted { phase: Phase, outcome: PhaseOutcome, }, TargetDryRun { target: String, }, TargetBuilt { target: String, }, TargetPublished { target: String, receipt: PublishReceipt, }, TargetCancelled { target: String, reason: String, }, TargetDelegated { target: String, adapter: String, }, TagCreatedLocal { tag: String, }, TagPushedRemote { tag: String, }, GithubReleaseCreated { tag: String, url: Option<String>, }, GithubReleaseDelegated { tag: String, delegated_to: String, }, RunAbandoned { reason: String, },
}
Expand description

The payload of a journal event — the ADR-0002 event classes. Serialized internally tagged on a kind discriminator, flattened into the JournalEvent envelope so each JSONL line is one flat object.

Variants§

§

RunCreated

The run was created: fixes its identity (run_id), the approved plan it executes (plan_id), and the ordered target set. Always the first event.

Fields

§run_id: String

The run’s unique id (a ULID from the injected IdGen).

§plan_id: String

The sealed, content-addressed plan id this run executes (ADR-0002).

§version: String

The chosen release version this run publishes — the human’s approved bump, sealed into plan_id and journalled as an input so resume (wave-3) can reconstruct the plan from the durable record alone (ADR-0002 §3; the plan module persists exactly plan_id + version).

A required field of the v1 event, deliberately not #[serde(default)]: a RunCreated without it is corrupt (a resume must never fabricate an empty version and hash it into a wrong plan_id), so crate::release::journal::read_events refuses such a line with an actionable error rather than defaulting to "".

§targets: Vec<String>

The ordered target set (e.g. ["rust", "node"]).

§

PhaseEntered

A phase barrier was entered.

Fields

§phase: Phase

The barrier now in progress.

§

PhaseCompleted

A phase barrier completed.

Fields

§phase: Phase

The barrier that completed.

§outcome: PhaseOutcome

Its outcome.

§

TargetDryRun

A target cleared its dry-run.

Fields

§target: String

The target id.

§

TargetBuilt

A target’s release artifact was built.

Fields

§target: String

The target id.

§

TargetPublished

A target was published — the point-of-no-return fact, with its receipt.

Fields

§target: String

The target id.

§receipt: PublishReceipt

The receipt proving exactly what landed.

§

TargetCancelled

A target was cancelled (skipped) with a reason.

Fields

§target: String

The target id.

§reason: String

Why it was cancelled.

§

TargetDelegated

A CI-delegated target was skipped in the publish phase: its artifact is produced out-of-band by the tag-triggered CI (e.g. cargo-dist’s release.yml, a release-please merge job, or PyPI’s trusted-publisher workflow), not by the engine’s publish step. Distinct from Self::TargetCancelled (a deliberate operator skip): a delegated target is expected to land via CI, so resume/verify treat it as neither engine-published nor missing/failed — the engine simply does not own it (release-engine-cut-cargo-dist-flow).

Fields

§target: String

The target id.

§adapter: String

The adapter identity that declared itself CI-delegated (its wire string, e.g. "cargo-dist"), for the operator-facing record.

§

TagCreatedLocal

The release tag was created locally.

Fields

§tag: String

The tag name.

§

TagPushedRemote

The release tag was pushed to the remote.

Fields

§tag: String

The tag name.

§

GithubReleaseCreated

The GitHub Release for the tag was created.

Fields

§tag: String

The tag name.

§url: Option<String>

The Release URL, when GitHub reports one.

§

GithubReleaseDelegated

The GitHub Release for the tag was delegated to CI — recorded in place of Self::GithubReleaseCreated. The plan carries a CI-delegated target (e.g. cargo-dist’s tag-triggered release.yml) whose workflow creates and finalizes the Release and uploads the cross-platform binaries, so the coordinator still creates and pushes the tag (that tag is what triggers CI) but deliberately does not create the Release itself — doing so would clash with CI over ownership of the same Release (creating it first, then CI either fails on “release already exists” or uploads into an engine-created stub). This fact is what lets resume/verify treat the missing engine-created Release as intentional rather than a step to re-attempt (coordinator-release-vs-cargo-dist-ownership).

Fields

§tag: String

The tag name whose Release creation was delegated to CI.

§delegated_to: String

The adapter identity whose CI owns the Release (its wire string, e.g. "cargo-dist") — the operator-facing record of what the Release was delegated to, mirroring Self::TargetDelegated’s adapter.

§

RunAbandoned

The run was abandoned. Terminal; there is no auto-rollback (ADR-0002).

Fields

§reason: String

Why the run was abandoned.

Implementations§

Source§

impl EventKind

Source

pub fn idempotency_key(&self) -> String

The stable idempotency key for this event — its natural semantic identity, so a retried step (re-publishing an already-published target, re-entering a phase) resolves to the same key.

This is metadata only: it is deliberately not used to suppress an append (see JournalEvent::idempotency_key). Two events can share a key yet be distinct facts that must both be recorded — a phase_completed Failed and, after a resume, a phase_completed Ok for the same phase. Replay idempotency comes from JournalEvent::seq (the watermark), never from this key.

Trait Implementations§

Source§

impl Clone for EventKind

Source§

fn clone(&self) -> EventKind

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 EventKind

Source§

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

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

impl<'de> Deserialize<'de> for EventKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for EventKind

Source§

impl PartialEq for EventKind

Source§

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

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 EventKind

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.