mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-23 03:21:58 +00:00
时间线认得核查日志里的 cause: run_deadline:单次运行时限将至没核成的那几行说时限,下一步说怎么腾出时间,不再叫人调高核查的上限或去查模型和数据源;设置页双盲复算、反方审稿的时长设成不限时写明仍受单次运行时限约束
为什么(复核第 1 轮):反方审稿、双盲复算为后续节点预留时间,没开始的、缩短时长后到时没做完的以前读成「反方审稿已达时长上限」「未能反查」「无法复算」,下一步是「调高反方审稿的上限」「检查核查模型和数据源」「调高……中的上限后重新运行」——调高了只会更快撞线,模型和数据源本来就没问题。服务端现在另起一条、带 cause 和 run_seconds(单次运行时限),这里照它说。设置页「不限」的说明原来写「仅受模型接口自身的超时约束」,可这两种核查在运行里执行,时限将至时照样按剩余时间缩短。 - decode.ts:dual_check_unchecked、challenge_unreviewed、challenge_limit 带 cause: run_deadline 时,标题写「运行时限将至,……」,副标题写「单次运行时限为 600 秒,已为后续节点预留时间」(双盲复算前面再点名指标),下一步写减少句数或指标、在核查前加人工审批(时限按审批前后分段计算)、请管理员调大单次运行时限(AGENTLAB_MAX_RUN_SECONDS);不带 cause 的照旧 - terms.ts:叫法放在 DUAL_CHECK_TEXT(共用的副标题和双盲复算两句)、CHALLENGE_TEXT.log(反方审稿三句)、VERIFY_SETTING_TEXT.unlimitedNote 多一种 runTimeout - VerifySettings.tsx:时长设成不限时,审批质询照旧(它不在运行的那一段里执行),双盲复算、反方审稿用 runTimeout 的说法 检查:check-decode 新增一节(追加在文件末尾),先核对后端还是这么发,再看三种日志带不带 cause 各怎么说、同一节点里两条分得开、缺字段不崩;对着改之前的 decode.ts 这一节 7 项变红。check-verify 新增一节(追加在文件末尾):三项时长设成不限时各自的说明,390px 深浅色不横向溢出、对比度 ≥ 4.5;改之前这一项变红。
This commit is contained in:
@@ -1601,6 +1601,42 @@ await section('设置页「核查」一节:老服务端没有这一组时不
|
||||
}
|
||||
})
|
||||
|
||||
await section('设置页「核查」一节:双盲复算、反方审稿的时长设成不限时,写明仍受单次运行时限约束;审批质询的照旧', async () => {
|
||||
// 双盲复算、反方审稿在运行里执行:一段执行有单次运行时限,时限将至时每项、每句的时长按剩余时间缩短(服务端
|
||||
// engine/deadline.py),设成不限也一样。以前这里写「仅受模型接口自身的超时约束」,管理员会以为设成不限就能查到底。
|
||||
// 审批质询不在运行的那一段里执行,不受单次运行时限约束,照旧
|
||||
const off = (part) => ({ ...fx.verify[part], timeout_s: null })
|
||||
const { page, errors } = await settingsPage({ verify: { ...fx.verify, dual_check: off('dual_check'), challenge: off('challenge'), inquiry: off('inquiry') } })
|
||||
await page.waitForSelector('[data-verify-settings]')
|
||||
const note = (k) => text(page.locator(`[data-verify-limit="${k}"] [data-verify-unlimited]`))
|
||||
const RUN = '不设上限,时长仍受单次运行时限约束,时限将至时按剩余时间缩短'
|
||||
check('双盲复算、反方审稿:说仍受单次运行时限约束', await note('dual_check.timeout_s') === RUN && await note('challenge.timeout_s') === RUN,
|
||||
`${await note('dual_check.timeout_s')} / ${await note('challenge.timeout_s')}`)
|
||||
check('审批质询:照旧只受模型接口自身的超时约束', await note('inquiry.timeout_s') === '不设上限,时长仅受模型接口自身的超时约束',
|
||||
await note('inquiry.timeout_s'))
|
||||
check('没有运行时报错', errors.length === 0, errors.join(';'))
|
||||
// 这句比原来长:390px 下照样折行、不横向溢出,深浅色都读得清
|
||||
for (const theme of ['dark', 'light']) {
|
||||
const narrow = await settingsPage({ width: 390, height: 844, theme,
|
||||
verify: { ...fx.verify, dual_check: off('dual_check'), challenge: off('challenge') } })
|
||||
await narrow.page.waitForSelector('[data-verify-settings]')
|
||||
await narrow.page.locator('[data-verify-limit="challenge.timeout_s"]').scrollIntoViewIfNeeded()
|
||||
const w = await narrow.page.evaluate(() => {
|
||||
const box = document.querySelector('[data-verify-settings]')
|
||||
const vw = document.documentElement.clientWidth
|
||||
const right = Math.max(...[box, ...box.querySelectorAll('*')].map((e) => e.getBoundingClientRect().right))
|
||||
const hint = document.querySelector('[data-verify-limit="challenge.timeout_s"] [data-verify-unlimited]')
|
||||
return { box: box.scrollWidth - box.clientWidth, beyond: Math.round(right - vw), color: hint && getComputedStyle(hint).color,
|
||||
base: getComputedStyle(document.body).backgroundColor }
|
||||
})
|
||||
const ratio = contrast(w.color, w.base, w.base)
|
||||
check(`390px(${theme}):这句说明折行、不横向溢出,对比度 ≥ 4.5`, w.box <= 0 && w.beyond <= 0 && ratio >= 4.5,
|
||||
`${JSON.stringify({ box: w.box, beyond: w.beyond })} · ${ratio.toFixed(2)}`)
|
||||
await shot(narrow.page, `settings-run-timeout-${theme}`)
|
||||
check(`390px(${theme}):没有运行时报错`, narrow.errors.length === 0, narrow.errors.join(';'))
|
||||
}
|
||||
})
|
||||
|
||||
await browser.close()
|
||||
console.log(failed ? `\n✗ 双盲复算与反方审稿:${failed} 项未通过` : '\n✓ 双盲复算与反方审稿:全部通过')
|
||||
process.exit(failed ? 1 : 0)
|
||||
|
||||
Reference in New Issue
Block a user