fix(rectification): give persist-first-sentence fixture a completed batch (BUG-635)
Independent Staging Quality Gate / validate (push) Successful in 9m47s
Independent Staging Quality Gate / publish (push) Successful in 8m55s

The staging gate failed because that case claimed 记下了 without a write tool, which the unwritten-evidence guard now rejects.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-10 18:11:25 +08:00
co-authored by Cursor
parent a1db6fe550
commit 8f9eb58738
3 changed files with 18 additions and 2 deletions
+16 -1
View File
@@ -158,7 +158,7 @@ test("no tool accepts event arrays, birth data or candidate ranges as input", ()
type StreamChunk = {
type: string;
payload?: { toolName?: unknown; text?: unknown; args?: unknown; error?: unknown };
payload?: { toolName?: unknown; text?: unknown; args?: unknown; error?: unknown; result?: unknown };
};
type FakeStreamResult = {
@@ -834,6 +834,9 @@ test("evidence persist keeps the first sentence when the model writes three", as
append_agentic_rectification_turn: () => ({ turn_id: TURN_ID }),
finalize_agentic_rectification_turn: () => ({ turn_id: TURN_ID, status: "completed", idempotent: false }),
});
// 原夹具:read-case 后直接写三句「记下了」,无 batch。
// 新夹具:batch completed 后再写那三句。
// 原因:BUG-635 把无写入的「记下了」收口成「这件我还没记上」;本用例锁的是已 persist 后只留第一句。
const { options } = runOptions({
action: "evidence",
accounting: accounting.client,
@@ -841,6 +844,18 @@ test("evidence persist keeps the first sentence when the model writes three", as
chunk("start"),
chunk("tool-call", { toolName: "rectification-read-case", args: { caseId: CASE_ID } }),
chunk("tool-result", { toolName: "rectification-read-case" }),
chunk("tool-call", { toolName: "rectification-record-evidence-batch", args: { caseId: CASE_ID } }),
chunk("tool-result", {
toolName: "rectification-record-evidence-batch",
result: {
accepted_recaps: [
{ display_date_label: "2016 年 9 月", event_phrase: "入学" },
{ display_date_label: "2020 年 6 月", event_phrase: "毕业" },
],
},
}),
chunk("tool-call", { toolName: "rectification-set-focus", args: { caseId: CASE_ID } }),
chunk("tool-result", { toolName: "rectification-set-focus" }),
chunk("text-delta", {
text: "记下了:2016 年 9 月入学、2020 年 6 月毕业。这对校正很有帮助。接下来我们继续。",
}),