# Production Readiness Verification

**Last Updated:** 2026-02-05
**Confidence:** High

## Summary

Checklist of verifications required before deploying StemeDB in production. Covers data integrity, security, performance, and operational readiness. Results are date-stamped in `uat/production-readiness/`.

**Key Areas:**
- Crash recovery & WAL durability
- Signature verification (v1/v2)
- Load testing & performance
- API security & authentication
- Backup/restore procedures
- Observability & monitoring

## Verification Categories

### Critical Path (Must Pass)

| Area | Test | Status |
|------|------|--------|
| Crash Recovery | WAL survives kill -9, no data loss | ✅ Tested |
| Signature Verification | Invalid signatures rejected | ✅ Tested |
| Conflict Detection | Skeptic lens returns accurate scores | ✅ Tested |

### Operational Readiness (Should Have)

| Area | Test | Status |
|------|------|--------|
| Load Testing | Sustained 1K writes/sec | ❌ Not done |
| Observability | Prometheus metrics endpoint | ⚠️ Partial |
| Backup/Restore | Documented recovery procedure | ❌ Not done |

### Security Audit (Must Have for Production)

| Area | Test | Status |
|------|------|--------|
| API Authentication | JWT or API key auth | ❌ Not done |
| Rate Limiting | Per-client limits | ❌ Not done |
| Key Management | Rotation procedure documented | ❌ Not done |

## File Pointers

- **WAL crash recovery tests:** `crates/stemedb-ingest/src/worker/tests/recovery.rs`
- **Signature verification:** `crates/stemedb-ingest/src/worker/processing.rs:310-404`
- **Signing utilities:** `crates/stemedb-core/src/signing.rs`
- **UAT results directory:** `uat/production-readiness/`

## Running Verifications

```bash
# Core tests (crash recovery, signatures)
cargo test -p stemedb-core -p stemedb-ingest -p stemedb-wal --lib

# End-to-end pipeline
cargo run --bin stemedb-api &
cargo run -p stemedb-ontology --bin pharma-ingest -- --with-conflicts
curl http://localhost:18180/v1/health
```

## Related Topics

- [Phase 6 UAT Results](./phase6-uat.md)
- [Consumer Health UAT](../../uat/consumer-health/README.md)
- [UAT Report Template](../../uat/how-to.md)
