PEP-266: тест трёх красных проверок ждёт сообщений агенту до 90 с
Мок берёт сообщения по одному, на каждый ход — два процесса хуков; под полным прогоном CI четыре хода подряд не укладываются в 25 с по умолчанию. Условие то же, увеличена только выдержка. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
336e63d82f
commit
9f9fb8208c
@ -134,13 +134,15 @@ describe("Красные проверки возвращаются агенту"
|
||||
assert.equal((await sent()).length, 1, "one message for the superadmin");
|
||||
assert.match((await sent())[0]!, new RegExp(`не проходят 3 раза подряд[\\s\\S]*Подробности: ${gitea.url}/`));
|
||||
assert.equal(await core.taskDelayed(db, taskId), true, "the story shows the delay line");
|
||||
await t.p.waitLog("the agent got the third log", (e) => e.ev === "prompt" && String(e.prompt).includes("fail #2"));
|
||||
// The mock takes the prompts one by one, two hook processes per turn: under a full CI run four turns
|
||||
// in a row can take longer than the default 25 s — the condition is the same, only the wait is longer.
|
||||
await t.p.waitLog("the agent got the third log", (e) => e.ev === "prompt" && String(e.prompt).includes("fail #2"), 90_000);
|
||||
// Attempts 4 and 5: nothing new for the superadmin; the 6th stops the agent.
|
||||
for (let i = 3; i < 5; i++) assert.equal(((await t.report(t.push(), "test", "failure", `fail #${i}`)).body as { action: string }).action, "agent");
|
||||
assert.equal((await sent()).length, 1);
|
||||
assert.equal(((await t.report(t.push(), "test", "failure", "fail #5")).body as { action: string }).action, "admin");
|
||||
assert.equal((await sent()).length, 2, "the attempts ran out — one more");
|
||||
await t.p.waitLog("runner told to stop", (e) => e.ev === "prompt" && String(e.prompt).includes("Не пушь новых попыток"));
|
||||
await t.p.waitLog("runner told to stop", (e) => e.ev === "prompt" && String(e.prompt).includes("Не пушь новых попыток"), 90_000);
|
||||
assert.equal((await core.pendingQuestions(db, t.proj.id)).filter((x) => x.kind === "question").length, 0);
|
||||
// Green again → the counter starts over, the delay is gone.
|
||||
const sha = t.push();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user