Skip to content

Event log envelopes

Every event, log line and status a node produces for an assignment is built as an envelope with the same shape: a contract version, a sequence, the correlation fields, a redacted payload, and an identifier derived from its content. This page is that shape, the lifecycle events an assignment produces, what is redacted before an envelope leaves the node, and how an envelope is split between your bucket and the control plane.

One envelope, two destinations

flowchart LR
  subgraph XD["XRATUD"]
    direction TB
    REC["Event, log or status"]
    SER{{"Serializer<br/>seq, correlation, redaction,<br/>event_id"}}
    MD["Channel record<br/>metadata only"]
    REC --> SER --> MD
  end
  BK[("Your bucket<br/>the envelope as an object")]
  CP["Control plane<br/>events and logs ingest"]
  SER ==>|"full envelope"| BK
  MD -->|"payload_ref, digest, size"| CP

The envelope is redacted before either copy is made, so neither your bucket nor the control plane receives a value the redaction rules match. The control plane's copy is a reference to the bucket object and its digest.

The envelope

Contract xratud.trace_audit.v1:

Field Holds
contract_version xratud.trace_audit.v1
record_type event, log or attestation
seq A sequence number, rising for the life of the process
emitted_at_epoch_ms When the envelope was built
event_type For an event, its type
run_id, node_id, assignment_id, trace_id The correlation fields
payload The redacted payload
event_id sha256 of the canonical envelope

A log envelope carries level and message where an event carries event_type. The event_id is computed from the envelope's own content, so the same envelope delivered twice has the same identifier.

Lifecycle events

Event type Emitted when
assignment.status.ack, .progress, .complete A status report is made
assignment.succeeded An assignment ends successfully
assignment.failed An assignment ends in failure
assignment.blocked A gate stops an assignment before it runs
assignment.replay_deduped A delivery finds its execution already finished

The succeeded, failed, blocked and replay events are each paired with a log line, so the same moment is readable in the event feed and in the logs.

What is redacted

A payload key is redacted when it matches a sensitive name, and a string is rewritten when it matches a sensitive pattern:

keys      authorization, token, access_token, refresh_token, secret, api_key,
          password, ciphertext, remote_ref, external_binding, manager_locator,
          resolver_subject, grant_id, external_version_id, audit_correlation,
          key_fingerprint,
          and any key containing secret, password, token, api key, authorization,
          private key or the names above
strings   Bearer <token>              becomes  Bearer [REDACTED]
          token=<value>, password:<value>, ...  become  token=[REDACTED], ...
          secret://<ref>              becomes  secret://[REDACTED]
          sk-<16 or more characters>  becomes  [REDACTED]

Redaction runs in the serializer, before the envelope is written anywhere, so the rules apply equally to the bucket object and to the control plane's record.

Where the envelopes go

Each envelope is written to the observability bucket as an object of one of three kinds:

assignment_event_envelope
assignment_log_envelope
assignment_status_envelope

The record sent to the control plane on the events or logs channel carries the correlation fields, the event type or log attributes, the workspace, and the object's payload_ref, payload_digest, payload_size_bytes and payload_content_type. It is checked against the metadata-only rule before it is queued, so a record carrying an inline payload, message or details is refused on the node. See The metadata-only ingest rule.

Every record in one batch belongs to one workspace; a batch mixing workspaces is refused before it is sent. See The control-plane client.