mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-24 20:12:15 +00:00
账本前端补两样:答案身上的召回标记写到问数据的轮次和证据面板「口径」一步;对账结果卡上问「说明有用 / 看不懂」
复核 W4R-03(a×c):召回在原答案的运行上追加 ledger.recalled、ledger.basis_changed,以前只在运行时间线(decode)里,问数据的
轮次底部、证据面板「口径」一步、账本接口都不带——使用者被标了「依据有变」、或者口径升版后「已按 v2 核对,不影响」,重开对话
什么也看不到,得点开「过程」才翻得出来,而使用者进不了记录页。W4-a 已在账本接口加上 recall(ledger/recall.answer_marks:
checked / basis / tasks,几种 state 都带),这边照它画:
- typesLedger:RunLedger.recall(LedgerRecallMarks)
- run/LedgerStep 新增 RecallMarks(问数据的轮次和「口径」一步共用):「已按口径「X」vN 核对,不影响」(同一份口径核对过
几次只写最近那一版,数变了的不在这里写);依据有变按两类各一行——数据目录(catalog / values / catalog_edit)和表结构
(structure),认不出的种类只说「答案的依据有变」不猜,项数相加,按新目录新出现错误级问题的写几条;看的人手上有说的是
这个答案的召回待办时写一句(口径升到 vN、数变了 / 依据有变检查出新问题)并链到 /apps/inbox/{待办}
- LedgerTurn:比对过的卡里写在摘要下面;没比对、不比对的答案(state 不是 matched)只要带着标记就单独写一张小卡
- LedgerPart(证据面板「口径」一步):有标签的写在脚注前;没标签但答案带着标记的,这一步只写标记
复核 W4R-10(多包):细案 02 做法 10 的 E2「说明有用 / 看不懂」以前没有入口。W4-a 已加 POST /ledger/answers/{run}/reconcile/
{对账运行}/feedback({verdict: useful | unclear},记成对账运行上的封存后事件、统计 E2 数它),账本接口的 reconciled 每一项
带 feedback {mine, useful, unclear}。这边:
- api.caliberLedger.feedback;typesLedger 加 LedgerFeedback、LedgerFeedbackOut
- run/LedgerReconcile 的对账卡:做完的卡问一句「「差在哪」的说明有帮助吗?」,两个按钮,看的人选过的按下(aria-pressed),
写各几个人(服务端给的数),可以改主意;交回来的反馈先画上,账本再取一次让别处挂着的同一张卡跟着变;回收站里只看不反馈;
没做完的卡不问
- 问数据的轮次里卡片上方没有「差在哪」,卡里补写一份(showWhere),反馈问的就是它;证据面板里它本来就在卡片上方,不重复
检查(写请求都在浏览器层拦下):
- check-evidence 新一段 ledger-recall:比对过的答案「口径」一步写核对过(只写最近那一版)、依据有变(项数相加、新问题条数)、
链到待办;不比对的答案这一步只写依据有变
- check-chat 新一段 recall:轮次底部同上,另核对做完的对账卡写「差在哪」和反馈人数;不比对的答案单独一张小卡写表结构有变
- check-ledger 对账一段:没做完不问;点「看不懂」请求体只有 verdict、按下、写各几个人;改点「说明有用」再记一条、按下的换过来
- 共用夹具 ledger-fixtures 加 RECALL
把这几个文件的改动拿掉回跑:check-chat recall 6 项、check-evidence ledger-recall 4 项、check-ledger 对账反馈 2 项都不过;
放回去全过
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
// EVIDENCE_SHOTS=<目录> 时亮暗两套各截几张,供人眼复核。
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { chromium } from '../frontend/node_modules/playwright-core/index.mjs'
|
||||
import { ledgerOf } from './ledger-fixtures.mjs'
|
||||
import { RECALL, ledgerOf } from './ledger-fixtures.mjs'
|
||||
|
||||
const WEB = process.env.AGENTLAB_WEB ?? 'http://localhost:5273'
|
||||
const CHROME = process.env.CHROME_PATH
|
||||
@@ -4207,6 +4207,40 @@ await section('ledger', '口径账本:来自口径的数字挂小标记(受
|
||||
await r.ctx.close()
|
||||
})
|
||||
|
||||
await section('ledger-recall', '口径账本:答案身上的召回标记写在「口径」一步里(已按 vN 核对,不影响;依据有变;有待办时链到待办)', async () => {
|
||||
// 召回在原答案的运行上追加 ledger.recalled、ledger.basis_changed(封存后),账本接口的 recall 把它们交出来(02 做法 7)。
|
||||
// 以前它们只在运行时间线里,证据面板、问数据的轮次都看不见。没比对的答案(state 不是 matched)照样可能被标依据有变
|
||||
for (const [name, LED] of [['matched', { ...ledgerOf(fx.run_id), recall: RECALL }],
|
||||
['ineligible', { run_id: fx.run_id, state: 'ineligible', reason: '这种来源的运行不比对', note: '封存后比对,不在封存范围内',
|
||||
recall: { checked: [], basis: RECALL.basis, tasks: [] } }]]) {
|
||||
const r = await open('/ui-harness.html?evidence=1', { before: (page) => page.route(
|
||||
(u) => new URL(u).pathname === `/api/runs/${fx.run_id}/ledger`, (route) => route.fulfill({ json: LED })) })
|
||||
const p = r.page
|
||||
const part = p.locator('[data-evidence-panel] [data-ev-ledger]')
|
||||
await openSeg(p, 's6', '[data-ev-ledger]')
|
||||
const marks = p.locator('[data-evidence-panel] [data-ledger-recall]')
|
||||
await marks.waitFor({ timeout: 4000 }).catch(() => {})
|
||||
const text = (await marks.innerText().catch(() => '')).replace(/\s+/g, ' ')
|
||||
if (name === 'matched') {
|
||||
check('比对过的答案:「口径」一步写「已按口径「周报口径」v3 核对,不影响」(核对过两次只写最近那一版)',
|
||||
text.includes('已按口径「周报口径」v3 核对,不影响') && !text.includes('v2 核对') && await p.locator('[data-evidence-panel] [data-ledger-recall-checked]').count() === 1,
|
||||
text)
|
||||
check('……依据有变:目录那一类两次的项数相加,写按新目录新出现几条错误级问题', text.includes('依据的数据目录有变(3 项)')
|
||||
&& text.includes('按新目录检查新出现 1 条错误级问题'), text)
|
||||
const link = p.locator('[data-evidence-panel] [data-ledger-recall-task="tk-recall-1"] a')
|
||||
check('……看的人手上有说的是这个答案的召回待办:写数变了、链到待办', text.includes('口径升到 v2,这个答案用到的数变了')
|
||||
&& await link.getAttribute('href').catch(() => null) === '/apps/inbox/tk-recall-1', text)
|
||||
check('……标记写在「口径」一步里,标签照旧', await part.getAttribute('data-ev-ledger').catch(() => null) === 'caliber')
|
||||
if (SHOTS) await p.locator('[data-evidence-panel]').screenshot({ path: `${SHOTS}/ledger-recall.png` }).catch(() => {})
|
||||
} else {
|
||||
check('不比对的答案:没有标签,「口径」一步只写依据有变', await part.getAttribute('data-ev-ledger').catch(() => null) === 'recall'
|
||||
&& text.includes('依据的数据目录有变(3 项)') && !text.includes('核对,不影响'), text)
|
||||
}
|
||||
check(`没有运行时报错(${name})`, r.errors.length === 0, r.errors.join(' | '))
|
||||
await r.ctx.close()
|
||||
}
|
||||
})
|
||||
|
||||
check('没有运行时报错(组件预览)', harness.errors.length === 0, harness.errors.join(' | '))
|
||||
await harness.ctx.close()
|
||||
await browser.close()
|
||||
|
||||
Reference in New Issue
Block a user