From d2d63e16815207533cb4d570011f09df62fe6a08 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Tue, 22 Sep 2026 15:00:49 +0200 Subject: [PATCH] e2e runs always test the build that was just made The test browser keeps Chrome's default profile, disk cache included, and nginx sends no Cache-Control header. Right after `npm run build` a run could load the index.html of the previous build and test old code. It showed up while measuring the scene view pan: a new debug hook returned NaN although server and bundle already had it. - signIn() turns the network cache off via Network.setCacheDisabled before the first page load. Tests: - GM_STEPS=5 (fresh seed): ALL PASSED, 10 checks. - ./check.sh: CHECK EXIT 0, 2080 tests. Co-Authored-By: Claude Opus 5 --- tools/lib/harness.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lib/harness.mjs b/tools/lib/harness.mjs index 229d15b5..06e837a0 100644 --- a/tools/lib/harness.mjs +++ b/tools/lib/harness.mjs @@ -424,6 +424,9 @@ function makeTools({ cdp, projectId, baseUrl, consoleLog, check, shotPrefix }) { */ const signIn = async () => { await cdp.send('Network.enable'); + // The browser keeps the default profile, disk cache included, and nginx sends no + // Cache-Control: a run could test the index.html of a build before the last one. + await cdp.send('Network.setCacheDisabled', { cacheDisabled: true }); await cdp.send('Network.setCookie', { name: SESSION_COOKIE, value: await sessionToken(baseUrl),