Skip to main content

Audit Service — Service Readiness

Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template · DEFINITION_OF_DONE

1. Readiness gate overview

The Audit Service is a platform-critical compliance service. It must be live before any other service goes to production (S0). Production deploy is blocked until all gates are green.


2. Gate checklist

Gate 1 — Documentation

CheckStatusVerifier
All 17 canonical docs populated (not stubs)Tech Lead
EPICS.md + USER_STORIES.md in JiraProduct Owner
SECURITY_MODEL.md reviewed and signedSecurity Lead + Compliance Officer
Chain integrity verification procedure documentedSRE

Gate 2 — Code quality

CheckStatusVerifier
TypeScript strict; zero errorsCI
ESLint: zero violations; hexagonal import rules passCI
Unit test coverage ≥ 80 % (domain + application)CI
Integration test coverage ≥ 70 %CI
test/integration/tenant-isolation.spec.ts greenCI — mandatory
test/integration/outbox.spec.ts greenCI — mandatory
test/integration/inbox.spec.ts greenCI — mandatory
Deduplication test: duplicate source_event_id silently skippedCI — mandatory
Chain-hash correctness testCI — mandatory
Pact consumer tests greenCI

Gate 3 — Security and compliance

CheckStatusVerifier
audit_app DB role: UPDATE/DELETE on audit_entries verified revokedDBA
RLS + JWT-scoped queries verified (cross-tenant query returns 403)Security Lead
Export signed URL TTL enforcedSecurity Lead
Meta-audit: bulk export request creates AuditEntryCompliance Officer
7-year retention partition policy applied and testedDBA
GDPR disclosure endpoint returns patient-scoped entries onlyCompliance Officer

Gate 4 — Observability

CheckStatusVerifier
OTEL traces visible in Grafana TempoSRE
Key Prometheus metrics publishingSRE
Grafana dashboards deployedSRE
AuditIngestionStopped alert configured and testedSRE
AuditChainIntegrityFailed alert configured — CRITICAL severitySRE
Chain integrity job scheduled and producing metricsSRE
DLQ alert configuredSRE

Gate 5 — Operations

CheckStatusVerifier
Canary deploy (5 %, 30 min) in staging; rollback verifiedSRE
Wildcard NATS consumer verified for all source service streamsPlatform Eng
Export file upload to object storage verified in stagingSRE
Pod disruption budget minAvailable=1 setSRE
On-call rotation assignedEngineering Manager
SERVICE_RISK_REGISTER.md CRITICAL/HIGH risks mitigatedTech Lead

3. Sign-off matrix

GateRequired signers
1 — DocumentationTech Lead, Product Owner, Compliance Officer
2 — Code qualityCI + Tech Lead
3 — SecuritySecurity Lead, DBA, Compliance Officer
4 — ObservabilitySRE Lead
5 — OperationsSRE Lead, Engineering Manager

4. Readiness levels

LevelDescriptionTarget
L1Service boots; wildcard NATS consumer active; INSERT to Postgres workingM0
L2All platform events ingested; query API live; chain-hash verifiedM0
L3Export jobs working; GDPR disclosure endpoint live; 7-year partition policy appliedM1
L4Full SLO-governed; chaos-tested; all gates greenM1