PEP-209: тест автономии ждёт подробностей карточки «готово» (гонка записи на медленном CI)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
peppa-bot 2026-11-18 17:38:12 +05:00
parent 721d4324b0
commit 4156cdaa3f

View File

@ -31,7 +31,9 @@ describe("autonomous cycle", () => {
assert.match(review.text, /готова к ревью/);
// PEP-152: the address of the result is a technical detail — under «Подробнее».
assert.doesNotMatch(review.text, /pr\/7/);
assert.match((await core.messageDetails(db, [review.id])).get(review.id) ?? "", /pr\/7/);
// The details are written right after the message row appears (a separate write): wait for them.
const details = await waitFor("details of the review card", async () => (await core.messageDetails(db, [review.id])).get(review.id) || null).catch(() => "");
assert.match(details, /pr\/7/);
assert.equal(await nudges(sid), 1, "the agent was nudged once instead of pinging the PM");
assert.ok(p.log().some((e) => e.ev === "continue"), "mock continued via the Stop hook");
const qs = await db.select().from(questions).where(eq(questions.sessionId, sid));