Audit attestation¶
For every run it executes, the node records which artifacts it verified, under which policy, before the kernel was reached. That record is the dependency attestation. It is written to your bucket in full, and the node keeps a hash-chained entry for it in its audit and attestation spool. This page covers what the attestation holds, where each copy goes, how the spool is chained and bounded, and the metrics it reports.
Where an attestation goes¶
flowchart TB
G["Artifact integrity gate<br/>every artifact passed"]
subgraph NODE["NODE"]
direction TB
SER["Serializer<br/>xratud.trace_audit.v1, attestation"]
subgraph SP["AUDIT AND ATTESTATION SPOOL"]
direction LR
AU[("audit stream<br/>hash-chained")]
AT[("attestation stream<br/>hash-chained")]
end
SER -->|"metadata record"| AT
end
BK[("Your bucket<br/>dependency_resolution object")]
CP["Control plane<br/>attestation_id in the run's reports"]
G --> SER
SER ==>|"full attestation"| BK
AT --> CP
The attestation's body is written to your bucket; the spool keeps a record with
the attestation's identifier and the bucket object's reference and digest. The
run's next report carries the attestation_id, so the control plane can name
the attestation for every run without holding its contents.
The dependency attestation¶
The attestation is written when every artifact of a run passes the integrity
gate, with attestation_type dependency_resolution:
{
"attestation_type": "dependency_resolution",
"run_id": "run_0e4d",
"node_id": "summarize",
"assignment_id": "asg_71c2",
"trace_id": "trc_5b10",
"attestation_doc": {
"policy_digest": "sha256:9a41...",
"trust_required": true,
"resolver_snapshot": {"manifest_id": "support-agent", "manifest_version": "3"},
"artifact_count": 2,
"artifacts": [
{"artifact_ref": "<registry reference>", "artifact_digest": "sha256:5f1e..."},
{"artifact_ref": "<registry reference>", "artifact_digest": "sha256:0c7a..."}
]
}
}
It is serialized as an attestation envelope and stored in the observability
bucket under the node's infrastructure identity. The spool record adds the
workspace and the object's payload_ref, payload_digest,
payload_size_bytes and payload_content_type. The metric
xratud.assignment.attestation.appended counts each one. See
Artifact integrity gate.
The spool¶
The spool holds two streams, audit and attestation, each an append-only
sequence of records:
| Field | Holds |
|---|---|
record_id |
aud- or att- followed by the first 24 hex of the record hash, unless the record names its own id |
stream, seq |
The stream, and the record's position in it, from 1 |
run_id, node_id, assignment_id, trace_id |
The correlation fields |
payload |
The record, with contract_version xratud.audit_attestation.v1 and recorded_at_epoch_ms |
prev_hash |
The previous record's record_hash in the same stream |
record_hash |
SHA-256 over prev_hash and the payload |
Each record's hash covers the one before it, so a record removed or changed in the middle of a stream breaks every hash after it.
Records are written to segment files of up to 256 records or 512 KiB, each
write flushed to disk before it returns, with the chain position kept in
chain_state.json. One writer at a time holds the spool's lock. The spool is
bounded at 128 MiB and lasts as long as the xratud process; its job is to
hold records while the control plane is unreachable. See
Telemetry under degradation.
Metrics¶
The spool reports xratud.audit_attestation.v1 in the heartbeat as
audit_runtime:
audit_event_count, attestation_count
audit_total_bytes, attestation_total_bytes
audit_segment_count, attestation_segment_count
chain_state per stream: last_hash, last_seq, count, current_segment_id, segments
last_seq for a stream equals its record count while the chain is intact. A
node whose audit_total_bytes approaches 128 MiB is holding records the
control plane has not yet taken; check the node's link to the control plane.