pub struct Envelope {
pub schema_version: u32,
pub producer: String,
pub producer_model_family: String,
pub staged_at: Timestamp,
pub batch_id: Option<String>,
}Expand description
Change-set-level metadata block. Carries producer identity and model family; individual ops never reference it and stay producer-agnostic.
Fields§
§schema_version: u32NDJSON-delta format version this envelope was staged under.
producer: StringOpaque producer identity token (interactive agent id, pipeline name, …).
producer_model_family: StringOpaque producer model family token, read by the cross-family review gate.
staged_at: TimestampWall-clock time the change-set was staged, supplied by the caller.
batch_id: Option<String>Opaque producer-assigned batch identifier. When present, a commit
landing this change-set uses it verbatim as the provenance trailer;
when absent, the committing tool derives a deterministic fallback
from producer and staged_at instead. Optional because the
identifier is opaque producer-internal tracking — a producer without
its own batching model is not forced to invent one.
Implementations§
Source§impl Envelope
impl Envelope
Sourcepub fn new(
producer: impl Into<String>,
producer_model_family: impl Into<String>,
staged_at: Timestamp,
) -> Self
pub fn new( producer: impl Into<String>, producer_model_family: impl Into<String>, staged_at: Timestamp, ) -> Self
Construct an envelope stamped with CURRENT_SCHEMA_VERSION and no batch_id.
Sourcepub fn with_batch_id(self, batch_id: impl Into<String>) -> Self
pub fn with_batch_id(self, batch_id: impl Into<String>) -> Self
Attach a producer-assigned batch identifier.