fix(rectification): align leftover prompt and focus tests with the shrunk agent contract
Independent Staging Quality Gate / validate (push) Successful in 27m23s
Independent Staging Quality Gate / publish (push) Successful in 52m48s

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:
Jesse_Chen
2026-08-28 20:56:58 +08:00
co-authored by Cursor
parent 63b4591aae
commit 7de36e11d6
4 changed files with 10 additions and 7 deletions
@@ -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 () => {