Public: anyone can read this; the crew can change it.
test/crew-review-budget.test.ts runs under 10 s #3606
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/3590-test-crew-review-budget-test-ts-runs-und → main 2 commits fork
3 files
changed +9
−6
scripts/test-times.json +1 −1
| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | "test/crew-declines.test.ts": 11.3, |
| 23 | 23 | "test/crew-limits.test.ts": 0.5, |
| 24 | 24 | "test/crew-pause.test.ts": 12.5, |
| 25 | "test/crew-review-budget.test.ts": 15.8, | |
| 25 | "test/crew-review-budget.test.ts": 1.5, | |
| 26 | 26 | "test/crew-review.test.ts": 11.6, |
| 27 | 27 | "test/crew-sandbox.test.ts": 5.3, |
| 28 | 28 | "test/crew-wrapup.test.ts": 23.6, |
test/crew-review-budget.test.ts +5 −2
| @@ -32,7 +32,10 @@ describe("the crew, with a stand-in Claude Code: review budget", () => { | ||
| 32 | 32 | agentRunSettled(app, repo, where, timeoutMs); |
| 33 | 33 | |
| 34 | 34 | beforeAll(async () => { |
| 35 | standIn = await startStandInCrew(); | |
| 35 | standIn = await startStandInCrew({ | |
| 36 | reviewBudgetMs: 300, | |
| 37 | tickMs: 50, | |
| 38 | }); | |
| 36 | 39 | ({ app, alice, repo } = standIn); |
| 37 | 40 | }, 30_000); |
| 38 | 41 | |
| @@ -73,5 +76,5 @@ describe("the crew, with a stand-in Claude Code: review budget", () => { | ||
| 73 | 76 | expect(reviews.find((r) => r.state === "cancelled")?.summary).toMatch( |
| 74 | 77 | /^budget: a review run/, |
| 75 | 78 | ); |
| 76 | }, 90_000); | |
| 79 | }, 10_000); | |
| 77 | 80 | }); |
test/helpers/crew-standin.ts +3 −3
| @@ -43,7 +43,7 @@ export interface StandInCrew { | ||
| 43 | 43 | |
| 44 | 44 | /** A forge with checks and a crew whose Claude Code is the stand-in. */ |
| 45 | 45 | export async function startStandInCrew( |
| 46 | options: { readonly tickMs?: number } = {}, | |
| 46 | options: { readonly reviewBudgetMs?: number; readonly tickMs?: number } = {}, | |
| 47 | 47 | ): Promise<StandInCrew> { |
| 48 | 48 | const dataDir = await mkdtemp(join(tmpdir(), "forge-crew-")); |
| 49 | 49 | const app = createApp({ dataDir, port: 0 }); |
| @@ -177,8 +177,8 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"Added CREW | ||
| 177 | 177 | budgetUsd: 1, |
| 178 | 178 | runTimeoutMs: 60_000, |
| 179 | 179 | networkRetryScale: 0, |
| 180 | reviewBudgetMs: 4_000, | |
| 181 | tickMs: options.tickMs, | |
| 180 | reviewBudgetMs: options.reviewBudgetMs ?? 4_000, | |
| 181 | ...(options.tickMs === undefined ? {} : { tickMs: options.tickMs }), | |
| 182 | 182 | }); |
| 183 | 183 | const a = await createUser(app.db, { |
| 184 | 184 | origin: "seed", |
new above
offline