A Status Column Is Not an Audit Trail: Designing for Accountability Across Regulated Products

Working across financial, insurance, and legal products makes one architectural question difficult to ignore:
Can the system explain how it reached its current state?
A feature can work perfectly from the user’s perspective while leaving important questions unanswered.
An application is approved. But by whom?
A policy changes. But which version did the customer accept?
A document is downloaded. But did the user have permission for that specific matter?
These are not merely reporting questions. They affect data modelling, authorisation, transaction boundaries, and operational access.
Start with the decision, not the table
Consider this model:
public sealed class Application
{
public Guid Id { get; set; }
public string Status { get; set; } = "Pending";
}
It records the present state. It does not explain the transition.
For an illustrative approval workflow, a separate decision record might capture:
public sealed record ApprovalDecision(
Guid Id,
Guid ApplicationId,
Guid ActorId,
string PreviousState,
string NewState,
string PolicyVersion,
string ReasonCode,
DateTimeOffset OccurredAtUtc,
string CorrelationId);
The distinction matters.
The application answers, “Where are we now?”
The decision record helps answer, “How did we get here?”
The ActorId should come from trusted identity context, not a field the caller can freely populate. Likewise, the policy version should identify the rules actually used, rather than whichever rules happen to be current when someone investigates later.
Persist the change and its evidence together
Suppose the application update succeeds but the decision record fails to save.
You now have a state change without its expected evidence.
When both records belong in the same relational database, one approach is to persist them in the same transaction:
await using var transaction =
await db.Database.BeginTransactionAsync(cancellationToken);
application.Approve();
db.ApprovalDecisions.Add(
new ApprovalDecision(
Guid.NewGuid(),
application.Id,
actorId,
"Pending",
"Approved",
policyVersion,
reasonCode,
timeProvider.GetUtcNow(),
correlationId));
await db.SaveChangesAsync(cancellationToken);
await transaction.CommitAsync(cancellationToken);
This is an illustrative transaction boundary, not a complete approval handler. Production code also needs resource authorisation, valid transition checks, and concurrency handling.
If evidence must reach another system, a local database transaction cannot make both systems commit atomically. A durable outbox is one option for recording the intention to publish alongside the business change.
Separate permissions from workflow rules
A user having an “Approver” role does not necessarily mean they can approve every application.
Useful questions include:
- Does the application belong to their organisation?
- Is the amount within their approval authority?
- Are they allowed to approve something they submitted?
- Is the application still awaiting a decision?
The first three concern authority. The fourth concerns workflow state.
Both must hold.
Also consider concurrency. Two approvers may read the same pending application before either saves. A concurrency token or conditional update can help prevent both decisions from silently succeeding against stale state.
Audit evidence is not a reason to collect everything
OWASP’s logging guidance distinguishes useful event information from secrets and sensitive data that should not be recorded directly.
For this example, an audit event might need a resource identifier, an actor, an outcome, and a reason code. It probably does not need the applicant’s complete bank details or the contents of every uploaded document.
An audit store also needs its own controls:
- Restricted write and read access.
- Protection against unauthorised modification.
- Appropriate retention and disposal rules.
- Monitoring of administrative access.
- A way to detect missing or altered evidence where required.
Calling a table AuditLog does not make it tamper resistant. That property depends on the surrounding controls.
Translate requirements with the right people
No generic architecture makes a product compliant by itself.
The applicable obligations depend on the product, jurisdiction, contracts, and types of information involved. Engineering needs clear requirements from security, legal, compliance, and product specialists.
The architectural contribution is to make those requirements enforceable and testable.
“Maintain accountability” is an intention.
“Every approval records the trusted actor, applicable policy version, outcome, and timestamp in the same transaction as the state change” is something a team can implement and verify.
That is where compliance becomes a design conversation rather than a document attached to a release.
Comments
Join the discussionThe status column answers where the application is now, and the separate decision record is what can answer how it got there. One point that is easy to understate is that ActorId and the policy version have to come from trusted context — the identity already established, and the rules that were actually applied — rather than from a field the caller can set, or from whichever policy is current at investigation time. If those two values can be rewritten later, the decision table can look complete and still fail as a trail. Keeping the previous state, the new state, and the reason on the same record as the change also makes a later review less dependent on reconstructing the sequence from the status column alone.
The separation between “current state” and the transition evidence is a strong design point. In document workflows, I’d also be careful to audit metadata and decision references without copying the document contents into the audit record; that keeps the evidence useful while limiting the sensitive data retained. How do you approach retention for those decision records?
A status history is what makes a regulated workflow explainable. The actor, timestamp, prior value, and reason for each transition seem just as important as the final state.



