mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-26 01:32:11 +00:00
前端跟上口径账本内核:时间线认得 ledger.matched;问数据的运行带上属于哪段对话、哪一轮;「在画布里打开」带来源
为什么:这一波合入就进 main,后端新加的封存后事件、来源链要在界面上接得住,不能有订阅了收不到、点了没用的地方
(next-round 02 做法 2、9)。账本的标签、证据面板的「口径」一步、对账在第 4 波接界面,这一波只有接口。
- run/decode.ts:ledger.matched 解读成时间线上一行「比对已发布口径:1 条查询等价已证明,2 条有相关口径」,副标题写明「封存后比对,
不在封存范围内」,事后补比、按需比的另写「按现在的口径回看」;有没比完的标成提醒;不改相位。文案进 lib/terms.ts 的 LEDGER_TEXT
(连同 X10 的叫法:来自口径 / 相关口径 / 这次的推理 / 没有比对,等价已证明 / 助手选用,受管 / 已发布)。
- store/chat.ts:发起运行时带 origin_ref {conversation_id, turn_id}(等开轮请求拿到服务端的轮次 id);服务端核对不过
(origin_ref_invalid:对话刚被删)时不带来源照常发起——来源只是留痕,不挡这一轮的回答。
- pages/ChatPage.tsx:「在画布里打开」带 origin {run_id, conversation_id, turn_id}(这一轮跑过才有);核对不过时不带来源照常新建。
run/AssistantStream.tsx 的 onOpenGraph 多给一个轮次 id(只加参数,别处不受影响)。
- api/client.ts:runs.start 的 origin_ref、workflows.create 的 origin。
- 检查脚本:check-decode 加「口径账本」一节;check-chat 断言发起时带上 origin_ref、「在画布里打开」带上来源;check-report-export
加「口径一步」:没比对过的运行没有这一步,数据块里放一份编的标签断网打开,面板最上面是「口径」、写明封存后比对、遮罩的参数写
「已遮罩」(只打印这一节,不打印真数据)。
验证:tsc、check-copy;check-all --stacks 1 decode chat report-export 全过(1485 项)。
This commit is contained in:
@@ -288,3 +288,13 @@ async def test_only_sealed_query_snapshots_are_compared(monkeypatch):
|
||||
await ledger_match.match_run(row.id, trigger="on_demand")
|
||||
recorded, _ = await matched(row.id)
|
||||
assert [q["status"] for q in recorded.content["queries"]] == ["proven"]
|
||||
|
||||
|
||||
async def test_cells_inside_a_table_are_labelled_the_same_way(monkeypatch):
|
||||
wf = await S.publish()
|
||||
row = await S.explore(monkeypatch, S.EQUIVALENT,
|
||||
text="本周销售额 [[v:Q1.r0.销售额]]。\n\n[[table:Q1 cols=销售额 rows=0-0]]")
|
||||
recorded, _ = await matched(row.id)
|
||||
[labels] = [r["labels"] for r in recorded.content["reports"].values()]
|
||||
assert len(labels) >= 2 and all(label["kind"] == "caliber" and label["caliber"] == f"{wf}@1"
|
||||
for label in labels.values())
|
||||
|
||||
Reference in New Issue
Block a user