mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-20 18:12:02 +00:00
系统派生的运行不进使用统计(总方案 X1、X2,细案 01 做法 4):评测一跑,聚类、白名单、目录使用热度都会被刷高
- engine/origin.py:SYSTEM_ORIGINS = (eval, reconcile, recall) 和 counted_runs()(写法同 hidden_runs,coalesce 防 NULL:来源为空的老运行、外连接没对上运行的行照常计入);ledger_issue 是替用户正式出具,照常计入 - 取问题、聚类全站只留一份:新增 app/chat/questions.py(recent_questions / cluster_questions)。只取问题原文、不取整份输入(以前把含 history 的 input JSON 拿去聚,同一段对话里的不同问题会聚成一类);问数据按轮次一轮一条(conversation_turns.question),同一轮里的自动重来只是换了挂着的运行,不多算;别的探索运行取 input.question;排除系统运行和别人的私有运行。/governance/exploratory-clusters 改用它,多给 turn_ids 和 embedder(本地哈希向量的结果只是下限) - 工具白名单衰减、目录的使用次数和「被哪些运行用过」、审阅队列的使用权重(都走 catalog.query_snapshot_tables)只算 counted_runs 圈进来的运行 - 记录页:没按来源筛时默认不列这三类,按来源点名就列;新增 GET /api/runs/unlisted(同一份筛选,_filtered 和列表共用)照实给出没列出几次、各是哪种来源。界面在列表底下(空列表时也写)写「另有 N 次系统运行未列出(评测 2 次、口径对账 1 次)」,来源下拉的「全部」改说「全部来源(不含系统运行)」;文案进 lib/terms.ts 的 SYSTEM_RUNS_TEXT;check-runs 补一段 - test_personal_apps 里代表「别的探索运行」的两条运行改成画布试跑:问数据的问题按轮次取,没挂在任何一轮上的问数据运行不单独算 - 新增 tests/test_eval_origin.py(去掉 counted_runs 的过滤回跑,5 项都会失败)
This commit is contained in:
@@ -2407,6 +2407,26 @@ await section('运行来源:标签与筛选', async () => {
|
||||
check('只剩那一种来源', (await ids()).join(',') === 'fake0origin0canvas', (await ids()).join(','))
|
||||
await sel.selectOption('')
|
||||
await settle()
|
||||
// next-round X1:系统派生的运行(评测、口径对账、召回)默认不列,列表底下照实写有几次没列出;点名来源就不再说
|
||||
const unlistedAsked = []
|
||||
fakes.set('GET /api/runs/unlisted', (url) => {
|
||||
unlistedAsked.push(url.searchParams.get('origin_kind'))
|
||||
return { status: 200, json: { total: 3, by_origin: { eval: 2, reconcile: 1 } } }
|
||||
})
|
||||
await page.goto(`${WEB}/runs`, { waitUntil: 'networkidle' })
|
||||
await page.waitForTimeout(300)
|
||||
const note = page.locator('[data-runs-unlisted]')
|
||||
const noteText = await note.innerText().catch(() => '')
|
||||
check('列表底下写明另有几次系统运行未列出、各是什么', await note.count() === 1
|
||||
&& noteText.includes('另有 3 次系统运行未列出') && noteText.includes('评测 2 次') && noteText.includes('口径对账 1 次'), noteText)
|
||||
check('来源下拉的「全部」照实说不含系统运行', (await sel.locator('option').first().innerText()).includes('不含系统运行'))
|
||||
await sel.selectOption('eval')
|
||||
await settle()
|
||||
check('点名了来源:不再问、不再写没列出', await page.locator('[data-runs-unlisted]').count() === 0
|
||||
&& !unlistedAsked.includes('eval'), unlistedAsked.join(','))
|
||||
await sel.selectOption('')
|
||||
await settle()
|
||||
fakes.delete('GET /api/runs/unlisted')
|
||||
fakes.delete('GET /api/runs')
|
||||
if (base) {
|
||||
await page.goto(`${WEB}/runs/${base.id}`, { waitUntil: 'networkidle' })
|
||||
|
||||
Reference in New Issue
Block a user