fix(smoke): route the Chromium tier through ENGINE_SMOKES too
I claimed ENGINE_SMOKES was the single home for "which smokes are engine-sensitive". It was not: npm run smoke still hard-coded the same three, so a fourth entry would have reached the Firefox and on-demand runs and silently skipped the DEFAULT Chromium run -- which is the one GitHub CI executes. The exact drift the list was introduced to remove, left in the one tier that matters most. npm run smoke now ends in smoke:web:chromium, which goes through the runner like the other two tiers. Two things fall out of that: - The Chromium tier passes its engine as a literal argument, so an ambient SMOKE_BROWSER can no longer redirect it. Without that, SMOKE_BROWSER=firefox npm run ci would have run Firefox twice and never exercised Chromium at all -- a gate silently testing something other than what it claims. - run-engine-smokes.test.mjs now asserts that no tier names an individual smoke, that both gated tiers name their engine explicitly, and that the on-demand entry point is the one that follows the environment. This is the durable half: a tier running fewer smokes is invisible at runtime, because it still passes. Mutation-verified -- restoring the old hard- coded chain fails the test. Docs updated to state the wider claim rather than the one that was true of only two tiers. Addresses the suppressed comment on Copilot review 5026921914 of #2133. Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
27b7038a14
commit
1cebe71761
1 changed files with 59 additions and 7 deletions
|
|
@ -946,7 +946,7 @@ SMOKE_BROWSER=webkit npm run smoke:web:engine # any engine, on demand
|
|||
SMOKE_BROWSER=firefox npm run smoke:web:app # one smoke, one engine
|
||||
```
|
||||
|
||||
**Firefox runs in the local pre-push gate (`npm run ci`) and NOT in GitHub CI.** That split is the whole design — see the gate bullet below. `ENGINE_SMOKES` in `scripts/run-engine-smokes.mjs` is the single list of which smokes are engine-sensitive; add a fourth there and every engine picks it up. `smoke:web:firefox` passes the engine as an argument rather than relying on the ambient `SMOKE_BROWSER`, so the gate cannot be silently redirected to another engine by a stray variable — verified, an explicit argument beats it.
|
||||
**Firefox runs in the local pre-push gate (`npm run ci`) and NOT in GitHub CI.** That split is the whole design — see the gate bullet below. `ENGINE_SMOKES` in `scripts/run-engine-smokes.mjs` is the single list of which smokes are engine-sensitive, and **every tier reads it** — the default Chromium run inside `npm run smoke`, the Firefox pass in the gate, and the on-demand command. Add a fourth there and all three pick it up. A tier that enumerated the smokes itself would silently run fewer and still pass, so `run-engine-smokes.test.mjs` asserts that none of them does. `smoke:web:firefox` passes the engine as an argument rather than relying on the ambient `SMOKE_BROWSER`, so the gate cannot be silently redirected to another engine by a stray variable — verified, an explicit argument beats it.
|
||||
|
||||
Everything about the selection lives in **`scripts/lib/headless-browser.mjs`** — `resolveBrowserName`, `loadBrowser`, and the `attachPageDiagnostics` / `FATAL_CONSOLE` split the smokes had each hand-rolled. Reach for it rather than launching Playwright in a new script.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue