@@ -730,7 +730,7 @@ def test_gate_b_evidence_contract_is_atomic_offline_and_workflow_isolated(self)
730730
731731 unchanged_hashes = {
732732 ".github/workflows/ci.yml" : (
733- "6932845a0f919c816a086bdcf5976d38bb1195ee75af4d118e6fd4b962e11ac9 "
733+ "0a2d97843ad8045375258af0a96464e32aba1feb19f83c3b20f61f415bb8211c "
734734 ),
735735 "deploy/oidc_probe.py" : (
736736 "10f38b3c3df04c763f0e09ffe6128fc9d9fe174c4f3f7f161600992fcd84e2ff"
@@ -897,7 +897,7 @@ def test_gate_b_operator_contract_is_exact_and_workflow_isolated(self) -> None:
897897 "4dd65a576f3bd3d3bd2dff41170ee161f45ffe5362a4e4e1f8af0feabc081027"
898898 ),
899899 ".github/workflows/ci.yml" : (
900- "6932845a0f919c816a086bdcf5976d38bb1195ee75af4d118e6fd4b962e11ac9 "
900+ "0a2d97843ad8045375258af0a96464e32aba1feb19f83c3b20f61f415bb8211c "
901901 ),
902902 "deploy/oidc_probe.py" : (
903903 "10f38b3c3df04c763f0e09ffe6128fc9d9fe174c4f3f7f161600992fcd84e2ff"
@@ -1000,6 +1000,34 @@ def test_one_image_is_built_tested_and_published_only_after_all_gates(self) -> N
10001000 self .assertIn ("published-image record independently of deployment" , workflow )
10011001 self .assertNotIn ("terraform apply" , workflow )
10021002
1003+ def test_release_image_builds_and_verifies_the_runtime_static_manifest (self ) -> None :
1004+ dockerfile = (ROOT / "Dockerfile" ).read_text ()
1005+ workflow = (ROOT / ".github/workflows/ci.yml" ).read_text ()
1006+ manifest_gate = workflow .split (
1007+ "- name: Verify the built runtime static manifest" , maxsplit = 1
1008+ )[1 ].split ("- name: Smoke-test liveness without publishing" , maxsplit = 1 )[0 ]
1009+
1010+ self .assertIn ("DJANGO_SETTINGS_MODULE=website.settings.collectstatic" , dockerfile )
1011+ self .assertNotIn (
1012+ "DJANGO_SETTINGS_MODULE=website.settings.test "
1013+ "uv run --no-sync python manage.py collectstatic" ,
1014+ dockerfile ,
1015+ )
1016+ self .assertIn ("python -m scripts.verify_static_manifest" , manifest_gate )
1017+ self .assertIn ("website.settings.collectstatic" , manifest_gate )
1018+ self .assertIn ("website.settings.test" , manifest_gate )
1019+ self .assertIn ("malformed.json" , manifest_gate )
1020+ self .assertIn ("missing-entry.json" , manifest_gate )
1021+ self .assertIn ("target=/app/staticfiles,readonly" , manifest_gate )
1022+ self .assertLess (
1023+ workflow .index ("- name: Verify the built runtime static manifest" ),
1024+ workflow .index ("- name: Preserve the one tested image" ),
1025+ )
1026+ self .assertIn (
1027+ "curl --fail --silent --output /dev/null http://127.0.0.1:8000/unified/" ,
1028+ workflow ,
1029+ )
1030+
10031031 def test_serving_entrypoint_never_runs_migrations (self ) -> None :
10041032 entrypoint = (ROOT / "entrypoint.sh" ).read_text ()
10051033 dockerfile = (ROOT / "Dockerfile" ).read_text ()
0 commit comments