@@ -37,7 +37,11 @@ def test_dashboard_acceptance_and_kernel_checks_run_independently() -> None:
3737 assert "python -m mypy" not in dashboard
3838
3939 assert "if: always() && needs.changes.outputs.core_tests == 'true'" in aggregate
40- assert "needs: [changes, kernel-static-checks, typescript-coverage, dashboard-acceptance]" in aggregate
40+ assert (
41+ "needs: [changes, kernel-static-checks, typescript-coverage, "
42+ "dashboard-acceptance, chat-bundle-browser]"
43+ ) in aggregate
44+ assert "needs.chat-bundle-browser.result" in aggregate
4145 assert "needs.kernel-static-checks.result" in aggregate
4246 assert "needs.typescript-coverage.result" in aggregate
4347 assert "needs.dashboard-acceptance.result" in aggregate
@@ -46,23 +50,27 @@ def test_dashboard_acceptance_and_kernel_checks_run_independently() -> None:
4650@pytest .mark .parametrize ("kernel" , ["success" , "failure" , "cancelled" , "skipped" ])
4751@pytest .mark .parametrize ("typescript" , ["success" , "failure" , "cancelled" , "skipped" ])
4852@pytest .mark .parametrize ("dashboard" , ["success" , "failure" , "cancelled" , "skipped" ])
53+ @pytest .mark .parametrize ("browser" , ["success" , "failure" , "cancelled" , "skipped" ])
4954def test_checks_aggregate_requires_every_parallel_lane (
50- kernel : str , typescript : str , dashboard : str ,
55+ kernel : str , typescript : str , dashboard : str , browser : str ,
5156) -> None :
5257 gate = WORKFLOW .split ("name: Require kernel and Dashboard qualification" , 1 )[1 ]
5358 script = gate .split ("run: |" , 1 )[1 ].split ("\n \n node-minimum-compatibility:" , 1 )[0 ]
5459 result = subprocess .run (
5560 ["bash" , "-e" , "-c" , script ],
5661 env = {
5762 ** os .environ ,
63+ "BROWSER_RESULT" : browser ,
5864 "DASHBOARD_RESULT" : dashboard ,
5965 "KERNEL_RESULT" : kernel ,
6066 "TYPESCRIPT_RESULT" : typescript ,
6167 },
6268 capture_output = True ,
6369 check = False ,
6470 )
65- assert (result .returncode == 0 ) == (kernel == typescript == dashboard == "success" )
71+ assert (result .returncode == 0 ) == (
72+ kernel == typescript == dashboard == browser == "success"
73+ )
6674
6775
6876def test_minimum_node_lane_exercises_sqlite_without_a_skip_list () -> None :
@@ -197,7 +205,10 @@ def test_merge_gate_runs_on_all_prs_and_checks_every_core_aggregate() -> None:
197205 for name , output in (("checks" , "core_tests" ), ("test-shard" , "python_tests" ), ("stage2c-suite" , "stage2c_tests" ), ("windows-powershell" , "python_tests" ), ("presentation" , "presentation_tests" )):
198206 job = WORKFLOW .split (f" { name } :\n " , 1 )[1 ].split (" steps:" , 1 )[0 ]
199207 if name == "checks" :
200- assert "needs: [changes, kernel-static-checks, typescript-coverage, dashboard-acceptance]" in job
208+ assert (
209+ "needs: [changes, kernel-static-checks, typescript-coverage, "
210+ "dashboard-acceptance, chat-bundle-browser]"
211+ ) in job
201212 assert "if: always() && needs.changes.outputs.core_tests == 'true'" in job
202213 else :
203214 assert "needs: [changes, chat-bundle]" in job
@@ -207,15 +218,23 @@ def test_merge_gate_runs_on_all_prs_and_checks_every_core_aggregate() -> None:
207218def test_presentation_exemption_retains_real_frontend_checks_and_force_full () -> None :
208219 job = WORKFLOW .split (" presentation:\n " , 1 )[1 ].split (" merge-gate:\n " , 1 )[0 ]
209220 assert "name: chat-bundle-${{ github.sha }}" in job
210- producer = WORKFLOW .split (" chat-bundle:\n " , 1 )[1 ].split (" kernel-static-checks:\n " , 1 )[0 ]
211- assert "npm run smoke:personal-workspace-packaged" in producer
212- assert "npm run smoke:chat-turn-acceptance-retry" in producer
213- assert "npm run smoke:chat-upgrade" in producer
221+ producer = WORKFLOW .split (" chat-bundle:\n " , 1 )[1 ].split (" chat-bundle-browser:\n " , 1 )[0 ]
222+ browser = WORKFLOW .split (" chat-bundle-browser:\n " , 1 )[1 ].split (" kernel-static-checks:\n " , 1 )[0 ]
223+ # The producer publishes a built, verified bundle; the browser lane
224+ # qualifies that same artifact in parallel and `checks` requires it.
225+ assert producer .index ("chat_bundle.py verify --source" ) < producer .index ("actions/upload-artifact" )
226+ assert "smoke:" not in producer
227+ assert "needs: [changes, chat-bundle]" in browser
228+ assert "if: needs.changes.outputs.core_tests == 'true'" in browser
229+ assert "name: chat-bundle-${{ github.sha }}" in browser
230+ assert "chat_bundle.py build" not in browser
214231 assert (
215- producer .index ("npm run smoke:personal-workspace-packaged" )
216- < producer .index ("npm run smoke:chat-turn-acceptance-retry" )
217- < producer .index ("actions/upload-artifact" )
232+ browser .index ("actions/download-artifact" )
233+ < browser .index ("npm run smoke:personal-workspace-packaged" )
234+ < browser .index ("npm run smoke:chat-turn-acceptance-retry" )
235+ < browser .index ("npm run smoke:chat-upgrade" )
218236 )
237+ assert "continue-on-error" not in browser
219238 assert "scripts/chat_bundle.py verify --source" in job
220239 assert "status --short --untracked-files=all -- loopx/web/chat" not in job
221240 assert "continue-on-error" not in job
@@ -348,9 +367,11 @@ def test_four_shards_execute_each_test_once_and_merge_portable_coverage(
348367
349368
350369def test_backend_and_mixed_prs_require_the_browser_qualified_artifact () -> None :
351- producer = WORKFLOW .split (" chat-bundle:\n " , 1 )[1 ].split (" kernel-static-checks :\n " , 1 )[0 ]
370+ producer = WORKFLOW .split (" chat-bundle:\n " , 1 )[1 ].split (" chat-bundle-browser :\n " , 1 )[0 ]
352371 assert "needs.changes.outputs.core_tests == 'true'" in producer
353- for name in ("kernel-static-checks" , "typescript-core" , "dashboard-acceptance" , "test-shard" , "stage2c-suite" , "windows-powershell" , "presentation" ):
372+ aggregate = WORKFLOW .split (" checks:\n " , 1 )[1 ].split (" steps:" , 1 )[0 ]
373+ assert "chat-bundle-browser" in aggregate
374+ for name in ("chat-bundle-browser" , "kernel-static-checks" , "typescript-core" , "dashboard-acceptance" , "test-shard" , "stage2c-suite" , "windows-powershell" , "presentation" ):
354375 job = WORKFLOW .split (f" { name } :\n " , 1 )[1 ].split (" - uses: actions/setup-" , 1 )[0 ]
355376 assert "needs: [changes, chat-bundle]" in job
356377 assert "name: chat-bundle-${{ github.sha }}" in job
0 commit comments