PEP-280: тест ревьюера ждёт окончания ревью и запуска агента по отдельности, с запасом под нагрузку CI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d903b17770
commit
24e624be1a
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user