test(rectification): lock failReceipt engine_message for compare failures
BUG-659 moved compare tool_failed fingerprints into failReceipt; keep the source lock on the shared helper so the staging gate still requires a redacted engine_message. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -223,7 +223,12 @@ test("compare failure copy and receipt detail stay user-visible without PII", ()
|
||||
assert.match(agentRun, /withCompareFailedRetryNotice/);
|
||||
assert.match(agentRun, /rectification-compare-candidates/);
|
||||
const tools = readFileSync(new URL("../src/mastra/rectification-v9-tools.ts", import.meta.url), "utf8");
|
||||
assert.match(tools, /engine_message: engineMessageForReceipt/);
|
||||
// 原值: /engine_message: engineMessageForReceipt/ 写在 compare catch 里
|
||||
// 新值: failReceipt 统一写 engine_message,compare catch 调用它
|
||||
// 原因: BUG-659 失败回执抽成共享 helper,源码锁仍要保住脱敏原文
|
||||
assert.match(tools, /const message = engineMessageForReceipt\(error\)/);
|
||||
assert.match(tools, /engine_message: message/);
|
||||
assert.match(tools, /failReceipt\("rectification-compare-candidates"/);
|
||||
});
|
||||
|
||||
test("idle persist on a stale snapshot calls candidate score once", async () => {
|
||||
|
||||
Reference in New Issue
Block a user