Skip to content

Commit e04bd68

Browse files
sudoshiruvnet
andcommitted
docs(ops): define environment promotion gates + readiness matrix (Phase 0 + Phase 8)
Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent c281471 commit e04bd68

3 files changed

Lines changed: 105 additions & 17 deletions

File tree

docs/lineage/catalog.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Generated by `python3 scripts/docs/catalog_lineage_docs.py --write-catalog`.
1818

1919
## Summary
2020

21-
- Authored Markdown/MDX files: 935
22-
- Total lines: 419,965
21+
- Authored Markdown/MDX files: 936
22+
- Total lines: 420,053
2323
- Files missing lineage frontmatter: 0
2424

2525
## Category Counts
@@ -30,8 +30,8 @@ Generated by `python3 scripts/docs/catalog_lineage_docs.py --write-catalog`.
3030
| 95 | `public-docs-source` |
3131
| 93 | `closed-plan` |
3232
| 79 | `legacy-plan` |
33+
| 75 | `operations-lineage` |
3334
| 74 | `public-dev-blog` |
34-
| 74 | `operations-lineage` |
3535
| 50 | `active-spec` |
3636
| 42 | `legacy-spec` |
3737
| 36 | `session-lineage` |
@@ -70,7 +70,7 @@ Generated by `python3 scripts/docs/catalog_lineage_docs.py --write-catalog`.
7070
| `docs/lineage/plans/open/2026-05-07-parthenon-ingestion-templates-phase-4-plan-6-fhir-bulk-data-reader.md` | Parthenon Ingestion Templates — Phase 4, Plan 6: HL7 FHIR Bulk Data reader (streaming claims) | 62 | yes | `docs/lineage/plans/open/2026-05-07-parthenon-ingestion-templates-phase-4-plan-6-fhir-bulk-data-reader.md` |
7171
| `docs/lineage/plans/open/2026-05-07-parthenon-ingestion-templates-phase-4-plan-7-federated-mapping-spike.md` | Parthenon Ingestion Templates — Phase 4, Plan 7: Federated mapping review spike | 61 | yes | `docs/lineage/plans/open/2026-05-07-parthenon-ingestion-templates-phase-4-plan-7-federated-mapping-spike.md` |
7272
| `docs/lineage/plans/open/2026-05-07-parthenon-ingestion-templates-phase-4-plan-8-upstream-diff-workflows.md` | Parthenon Ingestion Templates — Phase 4, Plan 8: Quarterly upstream-diff workflows (ARTEMIS + NAACCR) | 53 | yes | `docs/lineage/plans/open/2026-05-07-parthenon-ingestion-templates-phase-4-plan-8-upstream-diff-workflows.md` |
73-
| `docs/lineage/plans/open/2026-06-18-application-completion-plan.md` | Parthenon Application Completion Plan | 503 | yes | `docs/lineage/plans/open/2026-06-18-application-completion-plan.md` |
73+
| `docs/lineage/plans/open/2026-06-18-application-completion-plan.md` | Parthenon Application Completion Plan | 505 | yes | `docs/lineage/plans/open/2026-06-18-application-completion-plan.md` |
7474
| `docs/lineage/plans/open/2026-06-19-production-readiness-roadmap.md` | Parthenon Production-Readiness Roadmap | 351 | yes | `docs/lineage/plans/open/2026-06-19-production-readiness-roadmap.md` |
7575
| `docs/lineage/plans/open/README.md` | Open Plan Backlog | 47 | yes | `docs/lineage/plans/open/README.md` |
7676
| `docs/lineage/plans/open/protocol-to-publication-implementation-plan.md` | Abby — Protocol-to-Publication Pipeline: Implementation Plan | 380 | yes | `docs/lineage/plans/open/protocol-to-publication-implementation-plan.md` |
@@ -478,7 +478,7 @@ Generated by `python3 scripts/docs/catalog_lineage_docs.py --write-catalog`.
478478
| `docs/README.md` | Documentation Map | 76 | yes | `docs/README.md` |
479479
| `docs/lineage/README.md` | Developer Lineage | 147 | yes | `docs/lineage/README.md` |
480480
| `docs/lineage/archive/README.md` | Lineage Archive | 26 | yes | `docs/lineage/archive/README.md` |
481-
| `docs/lineage/catalog.md` | Documentation Lineage Catalog | 1132 | yes | `docs/lineage/catalog.md` |
481+
| `docs/lineage/catalog.md` | Documentation Lineage Catalog | 1133 | yes | `docs/lineage/catalog.md` |
482482
| `docs/lineage/design/README.md` | Design Lineage | 27 | yes | `docs/lineage/design/README.md` |
483483
| `docs/lineage/document-authoring-governance.md` | Document Authoring Governance | 136 | yes | `docs/lineage/document-authoring-governance.md` |
484484
| `docs/lineage/plans/README.md` | Plan Lineage | 32 | yes | `docs/lineage/plans/README.md` |
@@ -703,6 +703,7 @@ Generated by `python3 scripts/docs/catalog_lineage_docs.py --write-catalog`.
703703
| `docs/lineage/operations/2026-06-11-manuscript-publisher-bridge.md` | Migration + bridge: seed a /publish draft from the composed manuscript | 67 | yes | `docs/lineage/operations/2026-06-11-manuscript-publisher-bridge.md` |
704704
| `docs/lineage/operations/2026-06-11-study-results-projection.md` | Migration + backfill: project analysis executions into `study_results` | 165 | yes | `docs/lineage/operations/2026-06-11-study-results-projection.md` |
705705
| `docs/lineage/operations/2026-06-21-dr-restore-runbook.md` | PostgreSQL Backup & Restore Runbook (DR drill verified 2026-06-21) | 125 | yes | `docs/lineage/operations/2026-06-21-dr-restore-runbook.md` |
706+
| `docs/lineage/operations/2026-06-21-environment-promotion-gates.md` | Environment Readiness Matrix & Promotion Gates | 85 | yes | `docs/lineage/operations/2026-06-21-environment-promotion-gates.md` |
706707
| `docs/lineage/operations/2026-06-21-test-skip-inventory.md` | Test Skip Inventory (2026-06-21) | 95 | yes | `docs/lineage/operations/2026-06-21-test-skip-inventory.md` |
707708
| `docs/lineage/operations/README.md` | Operations Lineage | 22 | yes | `docs/lineage/operations/README.md` |
708709
| `docs/lineage/operations/process/2026-04-24-care-bundles-migration-fixes.md` | Care Bundles Workbench — Migration & Permission Fixes | 49 | yes | `docs/lineage/operations/process/2026-04-24-care-bundles-migration-fixes.md` |
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
doc_type: runbook
3+
status: active
4+
date: 2026-06-21
5+
owner: acumenus
6+
module: infrastructure
7+
lineage_anchor: false
8+
supersedes: []
9+
superseded_by: null
10+
related_prs: []
11+
related_code:
12+
- backend/app/Console/Commands/SidecarReadinessCommand.php
13+
- backend/app/Http/Controllers/Api/V1/HealthController.php
14+
- deploy.sh
15+
- docs/lineage/operations/2026-06-21-test-skip-inventory.md
16+
---
17+
18+
# Environment Readiness Matrix & Promotion Gates
19+
20+
Closes the Phase 0 item "Record the runtime readiness matrix" and the Phase 8 item
21+
"Define environment promotion gates for local, staging, and production." It builds
22+
on `php artisan sidecars:readiness` (runtime sidecar probe) and the
23+
[test skip inventory](2026-06-21-test-skip-inventory.md) (which modules are
24+
hosted-only).
25+
26+
## Part A — Service readiness matrix
27+
28+
| Service | Readiness check | Local Docker | Hosted staging | Production |
29+
|---|---|---|---|---|
30+
| Backend API | `GET /api/health` (canonical; `HealthController`) | required | required | required |
31+
| Frontend assets | `frontend/dist/` built + served by nginx/Apache | `deploy.sh --frontend` | required | required (Apache) |
32+
| Postgres | connection + migrations current | required | required | required |
33+
| Redis / queues | `sidecars:readiness` (redis PING) + Horizon up | required | required | required |
34+
| darkstar (R/HADES) | `sidecars:readiness` (`/health`, required) | optional | required | required |
35+
| python-ai | `sidecars:readiness` (`/health`, required) | optional | required | required |
36+
| Solr | `/solr/<core>/admin/ping` | optional | required | required |
37+
| Orthanc / PACS | `sidecars:readiness` (reachability) | optional | hosted smoke | hosted smoke |
38+
| hecate / fhir-to-cdm / templates | `sidecars:readiness` (reachability) | optional | required | required |
39+
| anonymizer / SciSpaCy / Llettuce | (no app-side probe; ingestion-template stack) | optional | hosted smoke | hosted smoke |
40+
| Representative CDM data | row-count probes (see skip inventory) | optional | hosted smoke | required for clinical flows |
41+
42+
"hosted smoke" = validated by a hosted smoke test rather than a local gate; see the
43+
env-required clusters in the skip inventory.
44+
45+
## Part B — Promotion gates
46+
47+
A build promotes from one tier to the next only when **all** gates for the target
48+
tier pass. Each gate has a concrete, reproducible check.
49+
50+
| Gate | Check (command / signal) | local→staging | staging→prod |
51+
|---|---|---|---|
52+
| Backend health | `curl -fsS $BASE/api/health` → 200 (deploy.sh already smoke-checks this) | required | required |
53+
| Frontend asset deployment | `deploy.sh --frontend` builds `dist/`; `dist/index.html` present and served (never `npm run build` as the release path) | required | required |
54+
| Queue workers | Horizon running; `php artisan horizon:status` healthy; `queue:restart` signaled on deploy | required | required |
55+
| Database migrations | `php artisan migrate --pretend` clean (no pending) after `deploy.sh --db` | required | required |
56+
| AI / analysis sidecars | `php artisan sidecars:readiness` exits 0 (darkstar + python-ai + redis ready) | required | required |
57+
| Representative CDM data | CDM row-count probe non-zero for the flows the tier serves | optional | required for clinical flows |
58+
| PACS / DICOMweb | Orthanc reachable + a hosted PACS smoke (credentials, stats, study browser) | hosted smoke | hosted smoke |
59+
| Ingestion template smoke | `cd templates && uv run pytest -q` green (env-bound skips documented) | required | required |
60+
| Bounded test lanes | `cd backend && composer test` green | required | required |
61+
62+
### Running the gate
63+
64+
```bash
65+
# Runtime sidecar gate (non-zero exit blocks promotion)
66+
docker compose exec -T php php artisan sidecars:readiness --json
67+
68+
# Bounded test gate
69+
cd backend && composer test # unit → integration → feature lanes
70+
cd templates && uv run pytest -q # ingestion templates
71+
72+
# Backend health smoke (deploy.sh performs this automatically)
73+
curl -fsS https://<host>/api/health
74+
```
75+
76+
## Notes
77+
78+
- The `sidecars:readiness` command treats darkstar, python-ai, and redis as
79+
**required** (non-zero exit) and the rest as reachability-only, so it is safe to
80+
wire directly into a CI/promotion step.
81+
- anonymizer / SciSpaCy / Llettuce have no app-side readiness probe today (they
82+
live in the ingestion-template stack); their promotion signal is the templates
83+
pytest smoke plus the hosted-only clusters noted in the skip inventory.
84+
- Production frontend is served by Apache from `frontend/dist/`; a promotion that
85+
changes the frontend must run `deploy.sh --frontend`, not the Vite dev server.

docs/lineage/plans/open/2026-06-18-application-completion-plan.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,9 @@ Parthenon is "complete enough" for this backlog when all of these are true:
177177
skip flagged; the rest env-required or tooling-limited).
178178
- [ ] Add a short "current known blockers" section to each active module plan
179179
that still drives work.
180-
- [ ] Record the runtime readiness matrix for local Docker, hosted staging, and
180+
- [x] Record the runtime readiness matrix for local Docker, hosted staging, and
181181
production-adjacent smoke checks.
182+
(`docs/lineage/operations/2026-06-21-environment-promotion-gates.md`)
182183

183184
Acceptance evidence:
184185

@@ -451,17 +452,18 @@ Acceptance evidence:
451452
- [ ] Llettuce.
452453
- [x] Redis queues/idempotency.
453454
- [x] PACS/Orthanc.
454-
- [ ] Define environment promotion gates for local, staging, and production:
455-
- [ ] backend health
456-
- [ ] frontend asset deployment
457-
- [ ] queue workers
458-
- [ ] database migrations
459-
- [ ] representative CDM data
460-
- [ ] AI/analysis sidecars
461-
- [ ] PACS/DICOMweb
462-
- [ ] ingestion template smoke
463-
- [ ] Publish an operator runbook for interpreting skipped tests and hosted-only
464-
checks.
455+
- [x] Define environment promotion gates for local, staging, and production:
456+
(`docs/lineage/operations/2026-06-21-environment-promotion-gates.md`)
457+
- [x] backend health
458+
- [x] frontend asset deployment
459+
- [x] queue workers
460+
- [x] database migrations
461+
- [x] representative CDM data
462+
- [x] AI/analysis sidecars
463+
- [x] PACS/DICOMweb
464+
- [x] ingestion template smoke
465+
- [x] Publish an operator runbook for interpreting skipped tests and hosted-only
466+
checks. (`docs/lineage/operations/2026-06-21-test-skip-inventory.md`)
465467

466468
Acceptance evidence:
467469

0 commit comments

Comments
 (0)