fix(rectification): align leftover prompt and focus tests with the shrunk agent contract
Independent Staging Quality Gate 2141 failed because four tests still matched the old Mastra prompt wall and treated an unrenderable focus as null. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -211,8 +211,8 @@ test("holdout not_ready forbids unique-minute copy and still blocks confirm", as
|
||||
assert.match(skill, /unique_minute_path=closed_at_representative/);
|
||||
assert.doesNotMatch(skill, /还不能确认唯一分钟/);
|
||||
assert.match(candidateComparison, /confirmation_gate/);
|
||||
assert.match(agentSource, /confirmation_gate/);
|
||||
assert.match(agentSource, /session_outcome=adopt_representative/);
|
||||
assert.match(agentSource, /confirmation_allowed/);
|
||||
assert.match(agentSource, /不得宣称唯一出生分钟/);
|
||||
assert.doesNotMatch(agentSource, /±2 分钟/);
|
||||
assert.equal(PUBLIC_RECTIFICATION_TOOLS.length, 14);
|
||||
assert.equal(RECTIFICATION_SKILL_VERSION, "10.0.13");
|
||||
|
||||
@@ -140,7 +140,7 @@ test("a 25-minute tied plateau projects width and forbids unique-minute confirma
|
||||
);
|
||||
assert.match(candidateComparison, /一段不可分区间/);
|
||||
assert.match(candidateComparison, /代表性候选/);
|
||||
assert.match(agentSource, /不得说已定位到唯一分钟/);
|
||||
assert.match(agentSource, /不得宣称唯一出生分钟/);
|
||||
});
|
||||
|
||||
test("read-case evidence context keeps day labels and confirm does not rewrite dates", async () => {
|
||||
@@ -215,7 +215,7 @@ test("new-case skill identity is 10.0.13 and the prompt prefers batch ingest", (
|
||||
assert.equal(RECTIFICATION_SKILL_VERSION, "10.0.13");
|
||||
assert.match(skill, /^version: 10\.0\.13$/m);
|
||||
assert.match(skill, /不要对同一句用户消息里的多件事件逐条 propose\+confirm/);
|
||||
assert.match(agentSource, /当前轮新事件一律走 rectification-record-evidence-batch/);
|
||||
assert.match(agentSource, /新事件走 rectification-record-evidence-batch/);
|
||||
assert.doesNotMatch(agentSource, /分别调用 rectification-propose-evidence 和 rectification-confirm-evidence/);
|
||||
});
|
||||
|
||||
|
||||
@@ -172,12 +172,15 @@ test("an unpersisted, mismatched, or incomplete focus cannot expose a discrimina
|
||||
questionId: focus.questionId,
|
||||
prompt: "不能展示",
|
||||
}), null);
|
||||
assert.equal(openQuestionFromPersistedFocus({
|
||||
const incomplete = openQuestionFromPersistedFocus({
|
||||
status: "created",
|
||||
focus: { ...focus, expectedAnswerSchema: { choice: { prompt: "不完整" } } },
|
||||
questionId: focus.questionId,
|
||||
prompt: "不能展示",
|
||||
}), null);
|
||||
});
|
||||
assert.equal(incomplete?.unrenderable, true);
|
||||
assert.equal(incomplete?.prompt, null);
|
||||
assert.equal(incomplete?.reason, "invalid_choice_schema");
|
||||
});
|
||||
|
||||
test("complete dynamic event options persist a server-owned focus", async () => {
|
||||
|
||||
Reference in New Issue
Block a user