mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 14:16:28 +03:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user