test(e2e): 智能体汇报断言跟随「整理」口径

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-06 18:46:40 +08:00
1 parent b32d5c028a
commit 7972a8069e
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -135,7 +135,7 @@ describe.skipIf(!hasPg)("E2 Agent 委托闭环(fake 模型 + 真实能力/授权
60_000,
"run waiting",
);
expect(waiting.summary).toContain("已提交≠已入库");
expect(waiting.summary).toContain("已提交≠已整理");
const events = await runEvents(e, runId);
const completed = events.find((x) => x.type === "run_completed");
expect((completed!.payload as { finalText: string }).finalText).toContain("已入库");
@@ -171,7 +171,7 @@ describe.skipIf(!hasPg)("E2 Agent 委托闭环(fake 模型 + 真实能力/授权
.selectAll()
.where("status", "=", "succeeded")
.executeTakeFirstOrThrow();
expect(done.summary).toContain("已入库 1 个");
expect(done.summary).toContain("已整理 1 个");
expect(done.summary).toContain(rec.id);
const detail = await e.api("GET", `/agent/runs/${runId}?afterSeq=-1&limit=500`);
expect(detail.body.data.report).toMatchObject({ state: "completed", imported: 1, submitted: 1 });
@@ -61,7 +61,7 @@ describe.skipIf(!hasPg)("E3 关闭聊天不影响后台", () => {
"run succeeded",
);
expect(run.finished_at).not.toBeNull();
expect(run.summary).toContain("已入库 1 个");
expect(run.summary).toContain("已整理 1 个");
// 业务表先落终态,引擎在最后一步返回后才把 run 标 completed:给这个窗口留时间(负载高时会有几百毫秒)
const engineRun = await waitFor(
async () => {
+1 -1
View File
@@ -113,7 +113,7 @@ describe.skipIf(!hasPg)("E4 崩溃恢复(worker 子进程 kill -9)", () => {
"run succeeded",
500,
);
expect(done.summary).toContain("已入库 1 个");
expect(done.summary).toContain("已整理 1 个");
// 不重复提交:qB 只收到一次 add;download.submit 账本只有一条(同幂等键)
expect(e.qb.callsTo("torrents/add")).toHaveLength(1);