feat(readiness): --no-browser flag — skipped browser gates FAIL, never pass #5528
1 changed file+9−0
Modifiedscripts/production-readiness.mjs+9−0View fileUnifiedSplit
@@ -279,6 +279,14 @@ async function main() {
279279 rendered.length ? `rendered to anonymous caller: ${rendered.join(', ')}` : `${AUTH_ONLY.length} paths correctly gated`);
280280
281281 // ── Render + overflow gates (real browser) ────────────────────────────
282 // --no-browser: the browser gates report FAIL-as-SKIPPED, never PASS.
283 // A machine whose Chromium can't launch (2026-08-25: 180s launch timeout
284 // on the owner's Windows box) must not convert "unverified" into "green" —
285 // the two-hard-gates-pass-by-skipping trap this script itself once had.
286 if (argv.includes('--no-browser')) {
287 add('render', true, false, 'SKIPPED (--no-browser) — unverified, not passed; run on a machine with working Chromium for the full verdict');
288 add('overflow', true, false, 'SKIPPED (--no-browser) — unverified, not passed');
289 } else {
282290 const browser = await chromium.launch();
283291 const jsErrors = [], overflows = [], brokenImgs = [], slow = [], noH1 = [];
284292 // First-pass timings over budget. NOT reported directly — see the
@@ -379,6 +387,7 @@ async function main() {
379387 noH1.length ? `${noH1.length} page(s) with no <h1>: ${noH1.slice(0, 6).join(', ')}` : 'every sampled page has an h1');
380388 add('perf', false, slow.length === 0,
381389 slow.length ? `over ${PERF_BUDGET_MS}ms: ${slow.join(', ')}` : `all sampled pages under ${PERF_BUDGET_MS}ms`);
390 } // end --no-browser else
382391
383392 // ── Report ────────────────────────────────────────────────────────────
384393 const pad = (s, n) => String(s).padEnd(n);
385394
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts