mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
[PR #1374] [MERGED] feat(labs/ci): browser-level wasm smoke via playwright + coep/coop #6501
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1374
Author: @profvjreddi
Created: 4/17/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @profvjreddi
Base:
dev← Head:feat/labs-browser-ci📝 Commits (3)
74948a4feat(labs/ci): browser-level wasm smoke via playwright + coep/coopa0292c6fix(labs/ci): wait for pyodide boot, not just marimo shell4a5964bfix(labs/ci): detect marimo python cell exceptions via console log scan📊 Changes
2 files changed (+272 additions, -3 deletions)
View changed files
📝
.github/workflows/labs-validate-dev.yml(+24 -3)➕
labs/tests/browser_smoke.py(+248 -0)📄 Description
what
adds a real headless chromium check to the
wasm-smoke-testjob in.github/workflows/labs-validate-dev.yml. after exporting labs to wasm html, the job now also:labs/tests/browser_smoke.py, which serves the exports with cross-origin isolation headers (coeprequire-corp, coopsame-origin, corpcross-origin) and drives headless chromium to each labmarimo-island,[role=\"tab\"], or.marimo-cell) and captures anypageerrororconsole.errorwhy
lab_05_dist_train shipped broken in #1353: plotly was imported before
micropip.install()in the wasm runtime. every static check, engine check, and node-pyodide wheel check passed. only a real browser with shared-array-buffer + coep/coop could surface the failure.this pr makes that specific regression class impossible to ship silently. the smoke set includes
labs/vol2/lab_05_dist_train.pyas an explicit regression guard.labs covered
vol1/lab_00_introduction.py— simple baselinevol1/lab_01_ml_intro.py— existing coveragevol2/lab_01_introduction.py— existing coveragevol2/lab_05_dist_train.py— regression guard (the #1353 lab)why coep/coop
pyodide's shared-array-buffer path (used by threading and some wheels) only enables when the document is cross-origin-isolated. a prior local playwright attempt timed out at 60s without these headers. matching the dev-preview site's headers + a 180s budget lines the ci up with actual prod boot time for labs that micropip-install mlsysim + plotly + pint.
test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.