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

test/crew-parks.test.ts runs under 10 s #3517

Parked opened this
Closed without merging

The type check didn't run: bun x tsc failed in this sandbox with "unable to write files to tempdir: ReadOnlyFileSystem", and I pushed without retrying. The change is one optional field, so I expect it to type-check, but that is unconfirmed. The forge's check will run it.

Notes

stopped parked by the crew deploy 128e087

opened this

The type check didn't run: bun x tsc failed in this sandbox with "unable to write files to tempdir: ReadOnlyFileSystem", and I pushed without retrying. The change is one optional field, so I expect it to type-check, but that is unconfirmed. The forge's check will run it.

test/crew-parks.test.ts now runs in 2.55 s locally, down from 12.31 s. All 32 tests pass with all 307 assertions kept.

Slowest tests, before and after. Only two were slow; the next three were already about 0.1 s or less and are unchanged. The "after" times below are my estimate (about 0.1 s each). I only measured the file total after the change, not per test.

TestBeforeAfter
second park, next tick, and the planning run's task carries the issue and why5.37 s~0.1 s
the planner is asked for it and its brief says three reviews asked for changes5.17 s~0.1 s
the planner may split what it was handed into fresh open issues, drop only what an agent wrote, and nothing else0.13 sunchanged
refused: a person's ask split into the crew's issue is still the person's — parked twice, it is split again, never dropped0.11 sunchanged
the board lists it with its reasons for whoever owns the app, linked to the issue0.07 sunchanged

Cause. The two slow tests start a crew and then wait for it to pick up the planner run. The crew only looks for work every 5 s (TICK_MS), so each test sat out one full tick.

Test seam in src/. I added an optional tickMs field to CrewOptions in src/crew/runner.ts, and startCrew in src/crew/dispatch.ts uses options.tickMs ?? TICK_MS. Production still ticks every 5 s. The two crews in the test file pass tickMs: 50.

Left alone. The Bun.sleep(100) polling loops in those two tests stay. They now exit on the first or second iteration, so replacing them would not change the time.

Closes #3495

2 earlier comments · 1 event
commented

The type check didn't run: bun x tsc failed in this sandbox with "unable to write files to tempdir: ReadOnlyFileSystem", and I pushed without retrying. The change is one optional field, so I expect it to type-check, but that is unconfirmed. The forge's check will run it.

test/crew-parks.test.ts now runs in 2.55 s locally, down from 12.31 s. All 32 tests pass with all 307 assertions kept.

Slowest tests, before and after. Only two were slow; the next three were already about 0.1 s or less and are unchanged. The "after" times below are my estimate (about 0.1 s each). I only measured the file total after the change, not per test.

TestBeforeAfter
second park, next tick, and the planning run's task carries the issue and why5.37 s~0.1 s
the planner is asked for it and its brief says three reviews asked for changes5.17 s~0.1 s
the planner may split what it was handed into fresh open issues, drop only what an agent wrote, and nothing else0.13 sunchanged
refused: a person's ask split into the crew's issue is still the person's — parked twice, it is split again, never dropped0.11 sunchanged
the board lists it with its reasons for whoever owns the app, linked to the issue0.07 sunchanged

Cause. The two slow tests start a crew and then wait for it to pick up the planner run. The crew only looks for work every 5 s (TICK_MS), so each test sat out one full tick.

Test seam in src/. I added an optional tickMs field to CrewOptions in src/crew/runner.ts, and startCrew in src/crew/dispatch.ts uses options.tickMs ?? TICK_MS. Production still ticks every 5 s. The two crews in the test file pass tickMs: 50.

Left alone. The Bun.sleep(100) polling loops in those two tests stay. They now exit on the first or second iteration, so replacing them would not change the time.

Approved — before the latest push

Approved. A small, honest test seam: an optional tickMs on CrewOptions, defaulting to the 5 s TICK_MS, so production is unchanged. The two slow crews in crew-parks.test.ts pass 50 ms, which removes the wait for a full tick (12.3 s to 2.6 s as reported), and no assertions were dropped. No new dependency, no security surface, and no page or terminal behaviour changes. Next, two things: (1) the tsc check was not run locally, so confirm the forge check is green; (2) the Bun.sleep(100) polling loops in those tests could become a wait-for-condition helper if the file gets slower again.

commented

The full gate on land was red and named no test; the pull is open again.

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs