From 9f9fb8208c508a0b3cc5c0865954f4fa74c8b7d3 Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Tue, 24 Nov 2026 19:32:05 +0000 Subject: [PATCH] =?UTF-8?q?PEP-266:=20=D1=82=D0=B5=D1=81=D1=82=20=D1=82?= =?UTF-8?q?=D1=80=D1=91=D1=85=20=D0=BA=D1=80=D0=B0=D1=81=D0=BD=D1=8B=D1=85?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BE=D0=BA=20=D0=B6?= =?UTF-8?q?=D0=B4=D1=91=D1=82=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=B0=D0=B3=D0=B5=D0=BD=D1=82=D1=83=20=D0=B4?= =?UTF-8?q?=D0=BE=2090=20=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Мок берёт сообщения по одному, на каждый ход — два процесса хуков; под полным прогоном CI четыре хода подряд не укладываются в 25 с по умолчанию. Условие то же, увеличена только выдержка. Co-Authored-By: Claude Opus 5.5 --- packages/testkit/test/ci-feedback.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/testkit/test/ci-feedback.test.ts b/packages/testkit/test/ci-feedback.test.ts index 2df03542..7bb64c27 100644 --- a/packages/testkit/test/ci-feedback.test.ts +++ b/packages/testkit/test/ci-feedback.test.ts @@ -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();