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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:p2sph3gfv2 is past its budget: trevato/forge: "test/studio.test.ts > the studio > (unnamed)" failed on 3 pulls in the last hour — the lane's red, not … #5324

Merged opened this

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

Merged

This change hardens the setup and teardown of `test/studio.test.ts`, but I never reproduced the failure, so it is a best guess at the cause. The suite passed three runs in a row here (22 tests, about 2.7 s each) and still passes after the change. The type check is clean.

shipped production is serving it deploy aa26afa

opened this

This change hardens the setup and teardown of test/studio.test.ts, but I never reproduced the failure, so it is a best guess at the cause. The suite passed three runs in a row here (22 tests, about 2.7 s each) and still passes after the change. The type check is clean.

The sentinel names the failing test "(unnamed)". I took that to mean a beforeAll or afterAll hook, not one of the named tests. Both hooks do work that depends on how loaded the machine is: beforeAll creates a user and a git-backed app, and afterAll deletes a temp directory that git children may still be writing to.

What changed, all in test/studio.test.ts:

  • beforeAll timeout: it now has an explicit 60 s timeout.
  • afterAll timeout: it now has an explicit 60 s timeout too.
  • Temp-directory removal: rm now retries (maxRetries: 20, retryDelay: 100), as test/mirror-out.test.ts and test/migrate-after.test.ts already do.

I did not touch any production code or the named tests. I couldn't see the failing CI log, so I can't confirm the guess. If the forge's check still reports this test red on the next push, the log will show which hook it is and the real cause.

To try it: bun test test/studio.test.ts.

Closes #5308

commented

This change hardens the setup and teardown of test/studio.test.ts, but I never reproduced the failure, so it is a best guess at the cause. The suite passed three runs in a row here (22 tests, about 2.7 s each) and still passes after the change. The type check is clean.

The sentinel names the failing test "(unnamed)". I took that to mean a beforeAll or afterAll hook, not one of the named tests. Both hooks do work that depends on how loaded the machine is: beforeAll creates a user and a git-backed app, and afterAll deletes a temp directory that git children may still be writing to.

What changed, all in test/studio.test.ts:

  • beforeAll timeout: it now has an explicit 60 s timeout.
  • afterAll timeout: it now has an explicit 60 s timeout too.
  • Temp-directory removal: rm now retries (maxRetries: 20, retryDelay: 100), as test/mirror-out.test.ts and test/migrate-after.test.ts already do.

I did not touch any production code or the named tests. I couldn't see the failing CI log, so I can't confirm the guess. If the forge's check still reports this test red on the next push, the log will show which hook it is and the real cause.

To try it: bun test test/studio.test.ts.

Approved

Test-only change: explicit 60s timeouts on the studio suite beforeAll/afterAll and a retrying rm in teardown, matching the pattern already used in mirror-out, migrate-after and member-crew tests. No production code touched, no security surface, shape kept. Caveat: the cause is a guess (not reproduced), so if the sentinel reports it red again, the log will name the real hook. Next: (1) if it recurs, find which hook/test is unnamed and fix the root slowness rather than the timeout; (2) consider a shared test helper for the retrying rm, now repeated in many files.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs