Expand description
Public wire DTOs for the event-sourced release journal (ADR-0003).
Two durable representations ride on these types:
journal.jsonl— the append-only event log: oneJournalEventper line, each self-contained (it carries its ownJOURNAL_SCHEMA_VERSION, a monotonicJournalEvent::seq, aJournalEvent::ts, anJournalEvent::idempotency_key, and itsEventKindpayload). The log is the single source of truth.manifest.json— the materializedRunStateprojection reduced from the log. It is disposable and reconstructable from the events (ADR-0003 §2): if the manifest cannot be rebuilt from the journal there would be two sources of truth, which is forbidden. It exists only as an O(1) cache forrelease show.
§Versioning + forward tolerance
The journal is durable across ossctl upgrades — a run started under one
version must be resumable under the next — so each event carries its own
JOURNAL_SCHEMA_VERSION, independent of the envelope crate::SCHEMA_VERSION
that versions the --json wire surface. Additive fields are tolerated (serde
ignores unknown fields on read); a newer required event schema is refused
with an actionable error rather than silently mutating state (the refusal
lives in crate::release::journal, which reads these back).
These DTOs are owned by the journal: siblings (the plan model, the adapters) may hold richer in-memory receipt types, but what the journal persists is exactly the shape here.
Structs§
- Journal
Event - One line of
journal.jsonl: a schema-versioned, sequenced, timestamped envelope around anEventKind. - Phase
Record - One completed-phase record in the
RunStateprojection. - Publish
Receipt - The per-target publish receipt the journal persists — the fact “this exact artifact landed” that resume/reconcile checks against the registry (the remote is ground truth, ADR-0003 §4).
- RunState
- The materialized run state — the projection reduced from the event log and
cached in
manifest.json. - TagState
- The progress of one release tag through its three landing steps. Every field
is monotonic (
false → true), so re-applying a tag event is a no-op.
Enums§
- Event
Kind - The payload of a journal event — the ADR-0002 event classes. Serialized
internally tagged on a
kinddiscriminator, flattened into theJournalEventenvelope so each JSONL line is one flat object. - Phase
- The four coordinator phases, in barrier order (ADR-0002): the derived
PartialOrd/Ordfollows declaration order, soDryRun < Build < Publish < Tag— the order the projection sorts phase records in. - Phase
Outcome - How a phase barrier finished.
- RunStatus
- Terminal-or-not status of a run, derived from the event stream.
Constants§
- JOURNAL_
SCHEMA_ VERSION - Schema version stamped on every
JournalEventandRunState.