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:
@@ -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