Every stage of the control path emits an immutable event to the audit trail powered by Trailproof. This produces a complete forensic record for every memory operation — from the moment it is received through to its final committed or blocked state.Trailproof provides SHA-256 hash chains, HMAC signing, query, and verification out of the box. Memproof delegates all audit trail responsibilities to Trailproof so you get tamper-evident logging without managing event storage internals.
Each event is a Trailproof TrailEvent with the following fields:
Python
TypeScript
Copy
Ask AI
class TrailEvent: event_id: str # globally unique ID event_type: str # e.g. "memproof.pipeline.received" timestamp: datetime # UTC timestamp actor: str | None # who triggered the event metadata: dict # stage-specific data (operation_id, tenant_id, etc.) hash: str # SHA-256 hash for chain integrity prev_hash: str | None # hash of the previous event in the chain signature: str | None # HMAC-SHA256 signature (if signing is enabled)
Copy
Ask AI
interface TrailEvent { eventId: string; // globally unique ID eventType: string; // e.g. "memproof.pipeline.received" timestamp: Date; // UTC timestamp actor: string | null; // who triggered the event metadata: Record<string, unknown>; // stage-specific data hash: string; // SHA-256 hash for chain integrity prevHash: string | null; // hash of the previous event in the chain signature: string | null; // HMAC-SHA256 signature (if signing is enabled)}
The metadata field carries the operation_id, tenant_id, project_id, and any stage-specific payload. Querying by operation_id within metadata returns the full lifecycle trace for a single operation.
In production, source the signing key from a secrets manager (AWS Secrets Manager, HashiCorp Vault, etc.) rather than hardcoding it. If the key is compromised, all signatures become untrustworthy.
Trailproof links every event to its predecessor via SHA-256 hashes, forming an append-only chain. If any event is tampered with, the chain breaks and verification fails. Use the verify_audit_trail() / verifyAuditTrail() method to validate the entire chain: