Fix first-variant benchmark scope

Count variants only inside the active generation wrapper so deferred carbonize markers cannot create false fast-path results.\n\nAI-assisted: OpenAI Codex.
This commit is contained in:
Paul Bakaus
2026-07-12 20:57:00 -07:00
parent 46d4fc4877
commit 833deeef16
+4 -2
View File
@@ -316,8 +316,10 @@ function createSplitProgressiveAgent(agent) {
async function waitForFirstVariant(page) {
const handle = await page.waitForFunction(() => {
const wrappers = [...document.querySelectorAll('[data-impeccable-variant]')];
return wrappers.some((element) => element.getAttribute('data-impeccable-variant') !== 'original');
const activeGeneration = document.querySelector('[data-impeccable-variants]');
if (!activeGeneration) return false;
const variants = [...activeGeneration.querySelectorAll('[data-impeccable-variant]')];
return variants.some((element) => element.getAttribute('data-impeccable-variant') !== 'original');
}, undefined, { timeout: 150_000 });
await handle.dispose();
}