fix(rectification): give persist-first-sentence fixture a completed batch (BUG-635)
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:
@@ -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 月毕业。这对校正很有帮助。接下来我们继续。",
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user