PehromGroup

The record of what happened

An audit trail is not a debug log. It answers a question a person will ask months later: who changed this, what did it say before, and who allowed it. If it cannot answer that, it is decoration.

Published 18 November 2026

Every row names the act, the actor and the record

A row carries a stable event name, the account that acted, the record it acted on, the moment in UTC and the reason when a reason was required. A refund, a role change, a factor reveal and a lifecycle change are events with their own names, not a general “updated” entry that hides what happened.

A secret is never part of the row. A reveal records that a factor secret was shown, to whom and by whose permission, and not the secret itself. The audit proves the act without becoming a second place the credential lives.

Append-only, and chained

The audit table takes inserts and refuses updates and deletes, even from the account that owns the table. Sensitive trails are hash-chained: each row carries a value derived from the row before it, so removing or rewriting one row breaks the chain at a point a reader can see.

This matters because the audit is evidence. A record that anyone with database access can quietly edit is a record that proves nothing in a dispute, however complete it looks on screen.

Logs are files, not rows

Runtime errors and warnings go to files with rotation and a retention period the writer actually reads. They are not written into the business database, because a diagnostic line is not a business fact and a failing service should not fill the table it depends on.

A repeated failure is fingerprinted into one entry with a count, and credentials, tokens and personal values are redacted before the line is written. The same redaction shape runs on both sides, so a value that is hidden on the server is not printed by the client.

If you cannot answer “who changed this” from the record, the record is not finished.

Start a conversation