fix(e2e): cycle gate resets games in place (no 240 page reloads) #103

Merged
funman300 merged 1 commits from fix/cycle-gate-newgame into master 2026-06-24 17:07:47 +00:00
Owner

The web-e2e cycle regression gate fails ~88% of runs with a 30s page.waitForFunction timeout at ~game 100/240 — a flaky-CI artifact of doing a fresh page.goto() per game (240 navigations in one browser context exhaust resources). The 18 actual e2e tests always pass; this is not a product bug.

Fix: add FERROUS_DEBUG.newGame(seed, drawThree) to game.js (already in play.html) and have cycle_metrics.js load the page once, then reset each game in place via newGame() instead of reloading. Evidence (progress 100/240 then timeout) directly supports the per-reload buildup cause.

Should finally turn web-e2e green.

The web-e2e cycle regression gate fails ~88% of runs with a 30s page.waitForFunction timeout at ~game 100/240 — a flaky-CI artifact of doing a fresh page.goto() per game (240 navigations in one browser context exhaust resources). The 18 actual e2e tests always pass; this is not a product bug. Fix: add __FERROUS_DEBUG__.newGame(seed, drawThree) to game.js (already in play.html) and have cycle_metrics.js load the page once, then reset each game in place via newGame() instead of reloading. Evidence (progress 100/240 then timeout) directly supports the per-reload buildup cause. Should finally turn web-e2e green.
funman300 added 1 commit 2026-06-24 17:07:32 +00:00
The cycle regression gate did a fresh page.goto() for each of 240 games in one
browser context. Around game ~100 the accumulated resources made
page.waitForFunction time out (30s), failing the gate on ~88% of runs — a
long-standing flaky-CI issue, not a product regression (the 18 e2e tests always
pass).

Load the page once and reset each game via a new __FERROUS_DEBUG__.newGame(seed,
drawThree) bridge method (added to game.js — it was already in play.html).
cycle_metrics.js now navigates once, then loops newGame() + runAutoplay with no
per-game reload, so the run stays fast and stable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
funman300 merged commit 189e0afd24 into master 2026-06-24 17:07:47 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: funman300/Ferrous-Solitaire#103