PEP-280: тест ревьюера ждёт окончания ревью и запуска агента по отдельности, с запасом под нагрузку CI
All checks were successful
peppa/lint lint: success за 3с
peppa/typecheck typecheck: success за 52с
peppa/build build: success за 37с
peppa/test test: success за 1740с
peppa-ci / ci (pull_request) Successful in 31m35s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
peppa-bot 2026-11-26 20:21:42 +00:00
parent d903b17770
commit 24e624be1a

View File

@ -231,7 +231,14 @@ describe("reviewer details", () => {
// Queued by an MCP process that died: the watchdog's tick picks it up.
const q = await core.queueReview(db, { projectId: t.proj.id, taskId: (await t.ref()).task.id, prNumber: 1, sha: head });
assert.equal(await runner.reviewTick(db), 1);
await t.p.waitLog("agent started with the findings", (e) => e.ev === "prompt" && String(e.prompt).includes("нет проверки доступа к /admin"));
// The tick runs the review in the background; under the full CI load the reviewer process
// and then the agent's start each take seconds — wait for each step on its own, with room.
const finished = await waitFor("queued review finished", async () => {
const r = await core.latestReview(db, (await t.ref()).task.id);
return r?.id === q.id && (r.state === "done" || r.state === "error") ? r : null;
}, 60_000);
assert.deepEqual([finished.state, finished.verdict, finished.error], ["done", "changes", null]);
await t.p.waitLog("agent started with the findings", (e) => e.ev === "prompt" && String(e.prompt).includes("нет проверки доступа к /admin"), 60_000);
assert.equal((await core.latestReview(db, (await t.ref()).task.id))?.id, q.id);
assert.equal((await t.ref()).task.status, "in_progress");
await stopAll(t);