Files
cs249r_book/tools
Vijay Janapa Reddi e2458f311d feat(tools): Playwright smoke-test harness for live-site verification
Introduces tools/release-smoke/ — a headless-Chromium smoke harness for
validating the live state of every mlsysbook.ai sub-site after a publish.

Each site in sites.json declares expected title, optional H1, headings,
additional pages, and a wait-strategy hint (WASM-heavy sites like /labs/
use 'domcontentloaded' since 'networkidle' never settles on long-lived
marimo sockets). For each site the runner:
  - fetches the landing URL
  - asserts HTTP 200, title match, optional H1 match
  - verifies expected headings render
  - collects every same-origin <a href> and HEAD-checks each
  - fetches each declared additional page
  - captures a full-page screenshot
  - captures console errors, page errors, failed requests

Output: reports/smoke-<ISO>.json + screenshots/<site>-<ISO>.png.
Exit code is non-zero iff any site had a hard error (title mismatch,
missing expected heading, missing additional page, uncaught JS error).

Used to verify the initial release train of instructors, slides,
mlsysim, and labs. Cross-site broken links that point to not-yet-
launched sub-sites (/staffml/, /about/, /community/, /vol1/, /vol2/)
are reported but treated as soft warnings.
2026-04-21 18:20:02 -04:00
..