diff --git a/internal/check-filter-width-stable.mjs b/internal/check-filter-width-stable.mjs index c997a9fe2..4748f300c 100644 --- a/internal/check-filter-width-stable.mjs +++ b/internal/check-filter-width-stable.mjs @@ -111,10 +111,27 @@ for (const [label, path, tab] of [ await browser.close() let failed = 0 +let unreachable = 0 +// ★ AN ABSENT SERVER IS NOT A PRODUCT FINDING, A MISSING CONTROL IS. +// The rule below ("an unmeasured host is a failure") is right and is kept: if the page loads and +// the trigger or tab cannot be found, the gate has been structurally defeated and must say so. +// But it was also firing when nothing had been measured AT ALL because no server was running — +// ERR_CONNECTION_REFUSED on :4173 printed "UNMEASURED" twice and then "FAIL — 2 host(s)". That +// accuses the product of a width regression on the strength of a missing process, and it cost a +// real misreading during this flight: the gate was reported as failing when it had simply never run. +// Every other browser gate in this repo already separates the two and says so in the same words — +// check-fits-the-screen, interop-harness, check-catalog-identity and check-legend-matches-source all +// print "SKIP — ... unreachable right now. Not a product finding." This one was the outlier. +const isUnreachable = (e) => /ERR_CONNECTION_REFUSED|ERR_CONNECTION_RESET|ECONNREFUSED|net::ERR_|ERR_EMPTY_RESPONSE/i.test(String(e)) console.log('FILTER-WIDTH: a trigger must not resize when an option is selected\n') for (const h of hosts) { console.log(`--- ${h.label} ---`) if (h.error) { + if (isUnreachable(h.error)) { + console.log(' UNREACHABLE: ' + h.error) + unreachable++ + continue + } // An unmeasured host is a failure. A gate that quietly drops a host reports success about // something it never looked at. console.log(' UNMEASURED: ' + h.error) @@ -133,6 +150,11 @@ for (const h of hosts) { } } +if (!failed && unreachable === hosts.length) { + console.log(`FILTER-WIDTH: SKIP — all ${hosts.length} host(s) unreachable. Not a product finding.`) + console.log(' Start a server first: `bun run serve` (or set BASE_URL).') + process.exit(0) +} if (failed) { console.error(`FILTER-WIDTH: FAIL — ${failed} host(s).`) console.error(' A trigger that grows on selection re-flows the selections row beneath it, so the')