mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-07 18:18:42 -05:00
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.
14 lines
320 B
JSON
14 lines
320 B
JSON
{
|
|
"name": "mlsysbook-release-smoke",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Playwright-based smoke tests for mlsysbook.ai sub-sites",
|
|
"scripts": {
|
|
"smoke": "node smoke.mjs",
|
|
"postinstall": "playwright install --with-deps chromium"
|
|
},
|
|
"dependencies": {
|
|
"playwright": "^1.59.1"
|
|
}
|
|
}
|