Expand description
Durable spool EventSink (S14, ADR-0029 — air-gapped audit).
SpoolEventSink makes the BLAKE3-chained AuditChain a first-class
emission sink rather than a failure-only spill. Every emitted
CloudEventV1 is appended to the chain and fsync’d to disk before
emit returns (the durability contract AuditChain::append now provides),
and only then is it best-effort forwarded to an optional inner transport.
This inverts the dead-letter model (write-on-failure): the audit row is durable first, so a disconnected or failing transport never loses the record — the row is on disk and verifiable offline, and the forwarder (S17) reconciles it to the broker later.
§Ordering and failure semantics
- Append to the chain (durable, fsync). A chain-append failure fails
emit— losing the durable record is fatal. - Best-effort
inner.emit. A transport failure is logged and does NOT failemit— the durable row already exists. SpoolEventSink::flushforwards to the inner transport.
§Redaction
Redaction MUST run upstream of the spool (compose Redact -> Spool,
ADR-0018): the spool writes the event verbatim as the chain row body, so any
credential redaction must already have happened before it reaches here.
§Integrity mode
Rows are integrity: blake3-chain and unsigned at this tier (signed: false): the chain is tamper-evident but not per-row signed. Sealed-segment
Ed25519 head signing is S15; this crate lands the durable chain-first sink.
Re-exports§
pub use bundle::export_bundle;pub use bundle::import_bundle;pub use bundle::verify_chain;pub use bundle::AuditBundle;pub use bundle::AuditBundleManifest;pub use bundle::ChainStatus;pub use forwarder::ChainForwarder;pub use forwarder::ForwardOutcome;pub use forwarder::RowPublisher;
Modules§
- bundle
- Cross-domain audit bundle: export / import / verify (S19, S20; ADR-0029).
- forwarder
- Spool→broker forwarder (S17, ADR-0029): idempotent reconcile of the durable spool into the broker on reconnect.
Structs§
- Spool
Event Sink - A durable, chain-first
EventSink. See the module docs for the ordering and failure semantics.
Constants§
- SEGMENT_
SEALED_ EVENT_ TYPE - CloudEvent
typeof a sealed-segment head signature (S15, ADR-0029).