Skip to main content

StepFact

Enum StepFact 

Source
#[non_exhaustive]
pub enum StepFact {
Show 16 variants CeremonyStarted { name: String, }, ActStarted { id: ActId, label: String, }, StepStarted { id: StepId, label: String, role: RoleId, role_name: String, }, PromptAnswered { step: Option<StepId>, prompt: Prompt, response: ResponseRecord, }, BackendOperation { step: StepId, kind: String, inputs: Value, outputs: Value, fingerprint: Option<String>, }, WrapRecipientRecorded { step: StepId, source: String, fingerprint: String, declared: bool, }, AttestationRecorded { step: StepId, role: RoleId, statement: String, }, ArtifactWritten { step: StepId, name: String, path: PathBuf, sha256: String, }, DeviationRecorded { step: Option<StepId>, text: String, }, StepAttemptFailed { step: StepId, attempt: u32, error: ErrorRecord, }, StepCompleted { id: StepId, outcome: StepOutcome, }, CeremonyCompleted {}, CeremonyFailed { error: ErrorRecord, }, EntropySeeded { m: String, source: String, derivation: String, }, EntropyContributed { step: StepId, epoch: u32, contribution: String, }, EntropyDrawn { step: StepId, path: String, value: String, },
}
Expand description

Durable, transcript-worthy fact.

Every variant is recorded by the runtime’s transcript sink synchronously before being forwarded to the UI. Action handlers emit BackendOperation and AttestationRecorded; all other variants are emitted by the executor at the corresponding lifecycle boundary.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

CeremonyStarted

Ceremony has started running.

Fields

§name: String

Ceremony name from the DSL.

§

ActStarted

Beginning of an act (named subdivision of a ceremony).

Fields

§id: ActId

Act identifier.

§label: String

Act label as authored in the DSL.

§

StepStarted

Beginning of a step.

Fields

§id: StepId

Step identifier.

§label: String

Step label as authored in the DSL.

§role: RoleId

Role responsible for this step (stable id).

§role_name: String

Human-readable role name, from the ceremony’s role definition. Carried alongside the id so transcripts stay self-contained for reports and verifiers without re-reading the ceremony YAML.

§

PromptAnswered

A prompt has been answered and validated.

Fields

§step: Option<StepId>

Step that issued the prompt, if any. None for ceremony-level prompts emitted before the first step (e.g. the ceremony-start confirmation) or after the last step.

§prompt: Prompt

The prompt as issued.

§response: ResponseRecord

Redacted response record.

§

BackendOperation

A backend operation completed and produced structured evidence.

Fields

§step: StepId

Step under which the operation ran.

§kind: String

Stable operation kind (e.g. generate_key, sign_data).

§inputs: Value

Structured inputs to the operation (parameters, references).

§outputs: Value

Structured outputs from the operation (artifact ids, hashes).

§fingerprint: Option<String>

Optional fingerprint of the produced material.

§

WrapRecipientRecorded

A key held outside the ceremony was used as the recipient of a wrap.

Its own fact rather than a field on the wrap operation: the method of a wrap is publishable and the identity of a custodian may not be, and a fact carries one confidentiality level.

The fingerprint records the bytes that were present. Nothing in the ceremony corroborates that they belong to the intended recipient, and nothing shows the recipient can open the result. The fact states an assumption the ceremony rests on, not something Rite proved.

Fields

§step: StepId

Step that wrapped to this recipient.

§source: String

The artifact or material the recipient key came from, as named in the ceremony.

§fingerprint: String

sha256:<hex> over the recipient’s SPKI DER.

§declared: bool

Whether the ceremony declared this fingerprint in advance, so the runtime checked the key it received against the definition rather than recording whatever arrived.

§

AttestationRecorded

A human attestation was recorded.

Fields

§step: StepId

Step under which the attestation was recorded.

§role: RoleId

Role that issued the attestation.

§statement: String

Verbatim attestation statement.

§

ArtifactWritten

An artifact was written to disk.

Fields

§step: StepId

Step that produced the artifact.

§name: String

Artifact name as declared in the DSL.

§path: PathBuf

Path on disk.

§sha256: String

Lowercase hex SHA-256 of the artifact bytes.

§

DeviationRecorded

A deviation was logged by the operator.

Fields

§step: Option<StepId>

Step in which the deviation was logged, if any. None for deviations logged outside of a step (before the first step or while a ceremony-level prompt is pending).

§text: String

Verbatim deviation text.

§

StepAttemptFailed

A step attempt failed. Recorded per attempt, so a retried step shows StepAttemptFailed{attempt: 1} followed by the operator’s retry decision and, on success, StepCompleted. The final attempt of a step that the run gives up on is followed by the terminal CeremonyFailed.

Fields

§step: StepId

Step whose attempt failed.

§attempt: u32

1-based attempt number within this step.

§error: ErrorRecord

Structured error record for the failed attempt.

§

StepCompleted

Step finished executing.

Fields

§id: StepId

Step identifier.

§outcome: StepOutcome

Outcome (completed or skipped).

§

CeremonyCompleted

Ceremony finished successfully.

The transcript’s cryptographic identity is SHA-256(line_bytes) for this line, recoverable by any reader, so the fact itself carries no fingerprint field. The runtime forwards the value to frontends through an out-of-band channel event.

§

CeremonyFailed

Ceremony failed or was aborted.

Fields

§error: ErrorRecord

Structured error record.

§

EntropySeeded

The ceremony entropy source was seeded with machine randomness.

Emitted once by the runner at ceremony start (run-metadata). Records the machine contribution m and the frozen derivation scheme so any value the ceremony later draws is re-derivable from the transcript alone. Part of the entropy source family.

Like every fact, it is timed by the at on its chain envelope.

Fields

§m: String

Lowercase hex of the gathered machine entropy m.

§source: String

Provenance of m (e.g. os). A single label today; comma-separated if more than one source is ever mixed.

§derivation: String

Frozen derivation-scheme tag (e.g. rite-kdf/v1) that pins the entire construction. A verifier rejects an unrecognised value.

§

EntropyContributed

A human folded additional entropy into the seed, advancing the ratchet.

Emitted by the authored gather_entropy step. The verbatim operator contribution is recorded so the epoch chain re-folds identically; it is public, witnessed entropy, not a secret. Timed by its enclosing step boundaries (and by the PromptAnswered that captured the input).

Fields

§step: StepId

Step under which the contribution was gathered.

§epoch: u32

Epoch index produced by this fold (1 for the first contribution).

§contribution: String

Verbatim operator contribution, fed as UTF-8 into the ratchet.

§

EntropyDrawn

A value was drawn from the entropy source (a nonce, certificate serial, or challenge).

Emitted whenever an action draws bytes from the entropy source. The derivation path plus the recorded seed let rite verify re-derive the value and confirm the right value reached the right consumer. Like other action-emitted evidence, it is timed by its enclosing step.

Fields

§step: StepId

Step that drew the value.

§path: String

Derivation path <epoch>/<step>/<purpose>.

§value: String

Lowercase hex of the derived bytes. Its length fixes the byte count, so rite verify re-derives exactly this many bytes from the seed.

Implementations§

Source§

impl StepFact

Source

pub fn is_side_effect(&self) -> bool

Whether this fact evidences work performed on the world: a backend operation, a written artifact, a captured attestation, or consumed entropy. Interaction records (an answered prompt, an operator deviation note) and lifecycle markers are not side effects: repeating the interaction is safe and simply produces a fresh record.

The runtime’s retry gate refuses to re-execute a step attempt that already emitted a side-effect fact.

Trait Implementations§

Source§

impl Clone for StepFact

Source§

fn clone(&self) -> StepFact

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 StepFact

Source§

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

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

impl<'de> Deserialize<'de> for StepFact

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 Serialize for StepFact

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

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<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> Same for T

Source§

type Output = T

Should always be Self
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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.