pub enum EventKind {
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,
},
TagCreatedLocal {
tag: String,
},
TagPushedRemote {
tag: String,
},
GithubReleaseCreated {
tag: String,
url: Option<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
version: StringThe 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 "".
PhaseEntered
A phase barrier was entered.
PhaseCompleted
A phase barrier completed.
TargetDryRun
A target cleared its dry-run.
TargetBuilt
A target’s release artifact was built.
TargetPublished
A target was published — the point-of-no-return fact, with its receipt.
Fields
receipt: PublishReceiptThe receipt proving exactly what landed.
TargetCancelled
A target was cancelled (skipped) with a reason.
TagCreatedLocal
The release tag was created locally.
TagPushedRemote
The release tag was pushed to the remote.
GithubReleaseCreated
The GitHub Release for the tag was created.
RunAbandoned
The run was abandoned. Terminal; there is no auto-rollback (ADR-0002).
Implementations§
Source§impl EventKind
impl EventKind
Sourcepub fn idempotency_key(&self) -> String
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<'de> Deserialize<'de> for EventKind
impl<'de> Deserialize<'de> for EventKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for EventKind
impl StructuralPartialEq for EventKind
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.