(page)
| 539 | } |
| 540 | |
| 541 | async function k4(page) { |
| 542 | const outputs = []; |
| 543 | await galaxyWithJsonb(page); |
| 544 | for (const name of ['JSONBAgg', 'BaseCommand']) { |
| 545 | let mark = await markWorker(page), from = await now(page); |
| 546 | if (name !== 'JSONBAgg') { await select(page, name); await scopeSettled(page); } |
| 547 | for (let run = 0; run < RUNS; run++) { |
| 548 | if (run === 0) await explanationDone(page); else { mark = await markWorker(page); from = await now(page); await clickExplainAgain(page); } |
| 549 | const [request] = (await sentSince(page, mark)).filter((entry) => entry.profile === 'automatic-explanation'); |
| 550 | const [raw] = await answersSince(page, from); |
| 551 | outputs.push({ name, run: run + 1, card: await explanationText(page), model: raw?.output, promptHasNumberedIds: /\[(?:graph|source)-\d+\]/.test(promptText(request)), modelCalled: Boolean(request) }); |
| 552 | } |
| 553 | await shot(page, 'K4', `explanation-${name}`, `The automatic explanation of ${name} after ${RUNS} runs: no "Graph 1/2/3".`); |
| 554 | } |
| 555 | await save('K4', 'outputs.json', outputs); |
| 556 | const echoes = outputs.filter((item) => /\bgraph[\s-]*\d\b/i.test(item.card)); |
| 557 | check('K4', `No "Graph 1/2/3" in ${outputs.length} real explanations of JSONBAgg and BaseCommand; prompt without [graph-N]`, echoes.length === 0 && outputs.every((item) => !item.promptHasNumberedIds), |
| 558 | { runs: outputs.length, echoes: echoes.length, modelRuns: outputs.filter((item) => item.modelCalled).length, cards: outputs.map((item) => `${item.name}#${item.run}: ${item.card.replace(/\s+/g, ' ').slice(-220)}`) }); |
| 559 | } |
| 560 | |
| 561 | async function setOutputLimit(page, value) { |
| 562 | await openConfig(page); |
nothing calls this directly
no test coverage detected