@@ -58,9 +58,9 @@ setting, not something the repository can enable by itself.
5858
5959- [x] 17.1 Delivery contract and trust boundaries
6060- [x] 17.2 Backend and frontend continuous integration
61- - [ ] 17.3 Compose image and migration validation
62- - [ ] 17.4 Release artifact and deployment safeguards
63- - [ ] 17.5 Workflow verification and operating guide
61+ - [x ] 17.3 Compose image and migration validation
62+ - [x ] 17.4 Release candidate and deployment safeguards
63+ - [x ] 17.5 Workflow verification and operating guide
6464
6565## 17.2 Continuous integration
6666
@@ -78,3 +78,68 @@ The frontend runs `tsc --noEmit` as its explicit type gate. Next's production
7878build uses its compiler-API mode because the project-local TypeScript CLI can
7979finish ` --showConfig ` before Next attaches its output listener. This avoids a
8080false build failure while preserving independent type checking in CI.
81+
82+ ## 17.3 Compose construction gate
83+
84+ The ` compose ` CI job runs only after the source-level backend and frontend
85+ checks pass. It validates ` docker-compose.yaml ` and then builds the backend and
86+ frontend images from a clean GitHub-hosted runner. The backend Dockerfile
87+ already embeds the unit-test and Alembic SQL gates, so this independently proves
88+ that the container recipe—not just a local virtual environment—remains valid.
89+
90+ The job builds images but never starts the Compose platform. That prevents CI
91+ from creating documents, contacting configured AI/SSO providers, or turning a
92+ pull request into an integration deployment.
93+
94+ ## 17.4 Manual release-candidate validation
95+
96+ ` release-validation.yml ` is deliberately manual. An operator supplies an
97+ existing semantic-version Git tag such as ` v1.2.3 ` ; the workflow checks out
98+ that immutable reference, resolves its commit SHA, and builds candidate backend
99+ and frontend images identified by that SHA. Its run summary records the tag,
100+ commit, and candidate image identities for a release handoff.
101+
102+ It has read-only repository access and does ** not** publish images, use
103+ repository secrets, deploy an environment, or mutate the Git tag. A registry,
104+ deployment environment, approval policy, rollout, and rollback design are
105+ prerequisites for a later Phase 18 deployment workflow.
106+
107+ ## 17.5 Verification and operator setup
108+
109+ ### Local verification
110+
111+ ``` bash
112+ # Validate the local platform declaration and cleanly build its two application images.
113+ docker compose config --quiet
114+ docker compose build --pull backend frontend
115+
116+ # Run the same source-level checks as CI.
117+ cd backend
118+ venv/bin/python -m unittest discover -s tests -v
119+ venv/bin/alembic upgrade head --sql > /tmp/aegis-ci-migrations.sql
120+
121+ cd ../frontend
122+ npm ci
123+ npm run typecheck
124+ npm test
125+ npm run build
126+ ```
127+
128+ ### GitHub setup and verification
129+
130+ 1 . Push the commits containing ` .github/workflows/ci.yml ` to the remote
131+ repository, then open a pull request or inspect the resulting push run in
132+ the ** Actions** tab.
133+ 2 . Confirm these three checks succeed: ** Backend tests and migration
134+ validation** , ** Frontend type, test, and production build** , and ** Compose
135+ image and migration gates** .
136+ 3 . In repository branch-protection settings, require all three checks before a
137+ protected-branch merge and require review for workflow-file changes.
138+ 4 . To prepare a release candidate, create and push an approved semantic-version
139+ Git tag, then choose ** Release candidate validation** in the Actions tab and
140+ enter that exact tag. Read the resulting job summary; it is a handoff record,
141+ not a deployment.
142+
143+ GitHub validates workflow syntax and executes these jobs only after the files
144+ are pushed. The local commands above verify the application behavior and Docker
145+ construction without requiring a remote account or a production secret.
0 commit comments