Expand description
Centralized audit table — the AuditStore trait.
Cheers’s audit table is the durable, queryable copy of every MCP-mediated
action kamaji observes on its host. Kamaji retains a local JSONL as
the source of truth and forwards batches here via POST /audit/ingest;
cheers’s responsibility ends at “accepted and durable on cheers’s side”
(see .yah/docs/working/mcp-auth-and-ownership.md §Audit ingest).
Append-only. There is no in-place edit or delete — the only writes are
AuditStore::insert_batch. Reads (paged by on_behalf_of) land in F14
atop this same trait.
Record shape per W159 §Audit journal: { at, sub, act, camp_id, aud, method, scope, result, request_id }. The wire and storage shapes match
one-to-one — cheers doesn’t repackage what kamaji sends, it just
durably appends. The only field cheers contributes is the row id and
the ingested_at server timestamp.
Structs§
- Audit
Record - One audit record — verbatim with W159 §Audit journal.
- Audit
Row - One row in the audit table — an
AuditRecordplus the bits cheers contributes (idandingested_at). - Memory
Audit Store - In-memory
AuditStorefor tests and single-node bootstrapping. Cheap toclone— shares one backing queue. Records keep insertion order.
Enums§
- Audit
Validation Error - Why an
AuditRecordfailed validation before reaching the store.
Traits§
- Audit
Store - Append-only persistence for audit records.