Compliance Audit
Every material decision produces an auditable record. This is the third of the three concerns that matching and compliance sit alongside — without it, neither of the other two can be defended after the fact.
Required fields
For every material decision:
- event ID
- subject — journey, match and/or booking
- action performed
- decision
- policy version
- rule code — which rule produced it
- reason codes
- timestamp
- actor or system
- request ID
- relevant input references
rule code is a code from the registry in Compliance Engine, not a free text key. An undefined term cannot be queried, and a rule that cannot be named cannot be reviewed.
Explainability
An administrator must be able to reconstruct any decision:
| Field | Why it is required |
|---|---|
| Decision | the outcome |
| Policy version | the ruleset in force |
| Rules evaluated | what was checked — absence is as important as presence |
| Rules passed | what was satisfied |
| Rules failed | what was not |
| Evidence | the data behind each result |
| Timestamp | when |
| Actor / system | who or what decided |
| Algorithm version | which engine build |
| Previous decisions | whether this supersedes an earlier decision |
The pass/fail split matters most. A verdict with no rule breakdown is an instruction, not a record.
Immutability
Compliance decisions are append-only.
A previous decision is never silently overwritten. When a decision changes:
Decision #1
│
▼
Decision #2
│
▼
Decision #3The complete history remains available and queryable.
Enforcement is at the database role level: the application role holds INSERT and SELECT on compliance_decisions and audit_logs, and no UPDATE or DELETE. A rule enforced only in application code is a convention; a rule enforced by grants is a control.
Storage
compliance_decisions -- the engine's answers, append-only
compliance_events -- matters needing human attention, with resolution
audit_logs -- who did what, append-onlyA decision and an event are different things and are stored separately. One match can produce a decision and no event — a clean ALLOW generates no work. Or several events and one decision. Keeping them apart stops a high-volume decision log from drowning the queue that needs a person.
Policy change and history
Historical decisions remain explainable after a policy change.
Because every decision records the policy_version it was made under, a reviewer looking at a journey approved six months ago can be shown the exact ruleset that approved it, rather than today's rules. Without this, a policy change silently rewrites the apparent meaning of every past decision.
Policy changes must not rewrite historical decisions. Activation of a new ruleset is a new row in policy_versions; it never mutates an old one.
Administrative actions
All administrative operations are audited:
- account restriction or suspension
- verification override
- rule configuration changes
- policy version activation
- event resolution
- regulatory export
The audit record captures actor, action, resource, before and after values, and a hashed IP. Administrative access is role-based, least-privilege, time-limited where appropriate, and audited.
