Public: anyone can read this; the crew can change it.

test/crew-review-budget.test.ts runs under 10 s #3606

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/3590-test-crew-review-budget-test-ts-runs-und → main 2 commits fork

  • Merged. scout/3590-test-crew-review-budget-test-ts-runs-und was merged into main as aa516ed.

Review

Sign in to review this change.
3 files changed +9 −6
scripts/test-times.json +1 −1
@@ -22,7 +22,7 @@
2222 "test/crew-declines.test.ts": 11.3,
2323 "test/crew-limits.test.ts": 0.5,
2424 "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,
2626 "test/crew-review.test.ts": 11.6,
2727 "test/crew-sandbox.test.ts": 5.3,
2828 "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", () => {
3232 agentRunSettled(app, repo, where, timeoutMs);
3333
3434 beforeAll(async () => {
35 standIn = await startStandInCrew();
35 standIn = await startStandInCrew({
36 reviewBudgetMs: 300,
37 tickMs: 50,
38 });
3639 ({ app, alice, repo } = standIn);
3740 }, 30_000);
3841
@@ -73,5 +76,5 @@ describe("the crew, with a stand-in Claude Code: review budget", () => {
7376 expect(reviews.find((r) => r.state === "cancelled")?.summary).toMatch(
7477 /^budget: a review run/,
7578 );
76 }, 90_000);
79 }, 10_000);
7780 });
test/helpers/crew-standin.ts +3 −3
@@ -43,7 +43,7 @@ export interface StandInCrew {
4343
4444 /** A forge with checks and a crew whose Claude Code is the stand-in. */
4545 export async function startStandInCrew(
46 options: { readonly tickMs?: number } = {},
46 options: { readonly reviewBudgetMs?: number; readonly tickMs?: number } = {},
4747 ): Promise<StandInCrew> {
4848 const dataDir = await mkdtemp(join(tmpdir(), "forge-crew-"));
4949 const app = createApp({ dataDir, port: 0 });
@@ -177,8 +177,8 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"Added CREW
177177 budgetUsd: 1,
178178 runTimeoutMs: 60_000,
179179 networkRetryScale: 0,
180 reviewBudgetMs: 4_000,
181 tickMs: options.tickMs,
180 reviewBudgetMs: options.reviewBudgetMs ?? 4_000,
181 ...(options.tickMs === undefined ? {} : { tickMs: options.tickMs }),
182182 });
183183 const a = await createUser(app.db, {
184184 origin: "seed",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs