# Production Readiness — Sovereign Stack ## Gate ```bash python3 scripts/production_check.py # imports · routes · registries · tests · assets ``` PASS = 5/5 checks. The gate runs as the `stage` step of the [agent build/deploy workflow](../workflows/agent-build-deploy.yaml). ## What is checked | Check | Expectation | |---|---| | Imports | all module packages import cleanly (sovereign, kyrexis, pec5d, coldcase, chat) | | API routes | kyrexis 19 · pec5d 22 · chat 5 (coldcase ≥ its suite) | | Registries | `verify_registries.py` → ALL VALID | | Tests | fast suite passes (140+) | | Deploy assets | dockerfiles, compose, PWA (manifest/sw), chat/store pages, build scripts, proofs | ## Configuration & env | Env | Module | Purpose | |---|---|---| | `DEEPSEEK_API_BASE` / `DEEPSEEK_API_KEY` / `DEEPSEEK_MODEL` | chat | model endpoint (unset ⇒ local echo) | | `KYREXIS_PAGE_ACCESS_TOKEN` | kyrexis | Messenger integration (unset ⇒ local mode) | | `PULSE_LOCK` | sovereign | biometric admin gate (default off) | | `HF_TOKEN` | deploy | dataset uploads (env-only, never persisted) | ## Health endpoints | App | Endpoint | |---|---| | Sovereign orchestrator | `/health` (src/sovereign/main.py) | | KyrexisAI | `/health` (kyrexis/api/app.py, port 8001) | | PEC5D | `/health` (pec5d/api/app.py, port 8002) | | Chat | `/health` (chat/api/app.py, port 8003) | ## Docker - `docker/Dockerfile.kyrexis` + `docker-compose.kyrexis.yml` - `docker-compose.coldcase.yml` (cold-case profile) - Each module exposes its own port; the orchestrator serves all routers on 8000. ## Patches Release track + continuous patches: see `docs/pec5d-releases.md` (daily_resonance_patch, coherence_hotfix, pattern_security_update, bio_interface_stability_patch). ## Theory proofing `proofs/theory_proofs.py` (P1–P7) + `tests/test_proofs.py` — internal math consistency verified; honesty gate documented in `proofs/README.md`.