F3 and C4
Access and Evidence
A log you can edit is not evidence. It is a note. Records append and carry the hash of the one before them. The table has no update path, so correcting something means appending the correction, which is itself a record with a name and a time on it.
The chain, and what breaks it.
Each record quotes its predecessor’s hash. Remove one, or change one, and every hash after it stops agreeing. The tampering is not prevented by hope; it is detectable by arithmetic anyone can rerun.
The database also refuses the statement outright. That is invariant I-4, and it is checked in CI rather than written into a policy document that nobody executes.
UPDATE on the second record. The table has no update path and the database rejects the statement. Invariant I-4, checked in CI. Correcting a record means appending the correction, which is itself a record.A chain alone only catches the careless.
Anyone who can rewrite the chain can recompute every hash after it. A self-consistent chain proves internal consistency and nothing about time.
So the head is periodically anchored: recorded, and then published somewhere this system cannot reach. A counterparty, a notarisation service, an append-only object store. The record of where it went is kept beside the anchor.
An anchor that has not been published is a placeholder for that, not a substitute, and the system reports it as one.
audit.chain_intact: every record’s predecessor hash matches the record before it.audit.anchors_agree: the chain still agrees with every anchor ever taken of it.audit.unanchored_entries: how much history is not yet covered by a published anchor.audit.anchored: an anchor has been taken recently enough to be worth anything.
What a record carries.
In front of it, commands that cannot run twice.
An audit trail is only as good as the writes reaching it. Every mutation carries an idempotency key, and a repeated call replays the stored response instead of executing again, so a retried timeout produces one record rather than two.
What it guarantees.
Each of these is enforced rather than intended, and each is something you can sit down and try to break on a call. We would rather you did.
- The evidence table has no update path. The database rejects the statement, so there is no code path, admin screen or support script that can alter a written record.
- Every record carries its predecessor’s hash. A removed or altered entry breaks every hash after it, and the break is found by arithmetic anyone can rerun.
- The chain head is anchored and the anchor is published outside this system, so the protection does not rest on the same database being trustworthy.
- Every mutation carries an idempotency key, so a retried timeout produces one record rather than two.
Try to change something on the call.
The demo everyone remembers is the one where we hand over a console and the database says no.