Public: anyone can read this; the crew can change it.
test/crew-continues.test.ts runs under 10 s #3640
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/3592-test-crew-continues-test-ts-runs-under-1 → main 4 commits fork
2 files
changed +8
−7
scripts/test-times.json +1 −1
| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | "test/cloud.test.ts": 7.1, |
| 19 | 19 | "test/crew-already-done.test.ts": 1.2, |
| 20 | 20 | "test/crew-check-failed.test.ts": 1.8, |
| 21 | "test/crew-continues.test.ts": 12.5, | |
| 21 | "test/crew-continues.test.ts": 1.5, | |
| 22 | 22 | "test/crew-declines.test.ts": 1.1, |
| 23 | 23 | "test/crew-limits.test.ts": 0.5, |
| 24 | 24 | "test/crew-pause.test.ts": 12.5, |
test/crew-continues.test.ts +7 −6
| @@ -33,10 +33,10 @@ describe("the crew, with a stand-in Claude Code: continuing a merged pull", () = | ||
| 33 | 33 | let promptFile: string; |
| 34 | 34 | |
| 35 | 35 | const settled = (where: (run: Run) => boolean, timeoutMs?: number) => |
| 36 | agentRunSettled(app, repo, where, timeoutMs); | |
| 36 | agentRunSettled(app, repo, where, timeoutMs, 20); | |
| 37 | 37 | |
| 38 | 38 | beforeAll(async () => { |
| 39 | standIn = await startStandInCrew(); | |
| 39 | standIn = await startStandInCrew({ tickMs: 20 }); | |
| 40 | 40 | ({ app, alice, bot, repo, argsFile, promptFile } = standIn); |
| 41 | 41 | }, 30_000); |
| 42 | 42 | |
| @@ -65,13 +65,14 @@ describe("the crew, with a stand-in Claude Code: continuing a merged pull", () = | ||
| 65 | 65 | // default branch, in the same session, and lands as a pull of its own. |
| 66 | 66 | const pullIssue = getIssue(app.db, repo.id, pull.number)!; |
| 67 | 67 | const agent = getAgentByName(app.db, "bot")!; |
| 68 | // The word that queued it, said after the run that opened the pull. | |
| 69 | await Bun.sleep(5); | |
| 68 | // The word that queued it, said after the run that opened the pull: | |
| 69 | // stamped a second past the run's end, so no wait orders them. | |
| 70 | const said = new Date(Date.now() + 1_000).toISOString(); | |
| 70 | 71 | app.db |
| 71 | 72 | .query( |
| 72 | "INSERT INTO comment (id, issue_id, author_id, body) VALUES (?1, ?2, ?3, 'Shorter, please.')", | |
| 73 | "INSERT INTO comment (id, issue_id, author_id, body, created_at) VALUES (?1, ?2, ?3, 'Shorter, please.', ?4)", | |
| 73 | 74 | ) |
| 74 | .run(`c-${pull.number}`, pullIssue.id, alice.id); | |
| 75 | .run(`c-${pull.number}`, pullIssue.id, alice.id, said); | |
| 75 | 76 | const queued = queueAgentRun( |
| 76 | 77 | app, |
| 77 | 78 | repo, |
new above
offline