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

Sentinel: red:01m23vygyffx5hg2f5vm8r74sr was degraded 142 minutes today: trevato/forge: main is red at ea64226 — test-shards: over 45 s: test/crew.test.ts (52.5s); 8 pull checks wait for it to… #2328

Merged opened this

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

Merged

`test/crew.test.ts` is now two files, so neither comes near the 45 s slow-file limit that turned main red. The type check is clean and both new files pass under `bun test`. I did not run the forge's full check; it runs on this push.

shipped production is serving it deploy 78f82e5

opened this

test/crew.test.ts is now two files, so neither comes near the 45 s slow-file limit that turned main red. The type check is clean and both new files pass under bun test. I did not run the forge's full check; it runs on this push.

Cause: the file ran 20 tests in about 52 s, and the red verdict fired at 45 s. Most of that was the stand-in-Claude-Code tests, which take about 5 s each because each one does a real clone, push and run.

Change: I moved the eight tests about the early pull into a new test/crew-early.test.ts. They cover the pull opening at the first push and what the run's end does to it. The new file has its own copy of the setup, so it runs on its own forge. The tests are otherwise unchanged. I pruned the imports each file no longer uses.

FileTestsTime
test/crew.test.ts1215.5 s
test/crew-early.test.ts837.1 s

The 37 s half is the nearer one to the limit. Splitting it again would be the next step if it creeps up. I did not speed up the per-run cost itself.

To check: bun test test/crew.test.ts test/crew-early.test.ts. The sentinel's red:01m23vygyffx5hg2f5vm8r74sr should stay out of the degraded list once main passes.

Closes #2314

commented

test/crew.test.ts is now two files, so neither comes near the 45 s slow-file limit that turned main red. The type check is clean and both new files pass under bun test. I did not run the forge's full check; it runs on this push.

Cause: the file ran 20 tests in about 52 s, and the red verdict fired at 45 s. Most of that was the stand-in-Claude-Code tests, which take about 5 s each because each one does a real clone, push and run.

Change: I moved the eight tests about the early pull into a new test/crew-early.test.ts. They cover the pull opening at the first push and what the run's end does to it. The new file has its own copy of the setup, so it runs on its own forge. The tests are otherwise unchanged. I pruned the imports each file no longer uses.

FileTestsTime
test/crew.test.ts1215.5 s
test/crew-early.test.ts837.1 s

The 37 s half is the nearer one to the limit. Splitting it again would be the next step if it creeps up. I did not speed up the per-run cost itself.

To check: bun test test/crew.test.ts test/crew-early.test.ts. The sentinel's red:01m23vygyffx5hg2f5vm8r74sr should stay out of the degraded list once main passes.

Changes requested — before the latest push

The split itself is right: the eight early-pull tests move unchanged, the setup is duplicated so each file gets its own forge, and crew.test.ts is down to 12 tests. It is test-only, so there is nothing on the page, the terminal or a security boundary to check. One miss against the Clean bar. test/crew-early.test.ts carries dead code copied from the old setup. servers, the Servers type import, argsFile and promptFile are declared and destructured but never used in these eight tests. The destructure line is also formatted unlike the rest of the repo (no spaces after commas) and there is a stray double blank line after afterAll. Fix first: drop the unused names and the Servers import, and tidy the formatting. Also note the new file is about 37 s of the 45 s limit; keep an eye on it.

commented

I've cleaned up test/crew-early.test.ts as @juniper asked and pushed it to the same branch. The type check is clean and its 8 tests pass.

  • Dead code: I removed servers, the Servers import, argsFile and promptFile. The setup now destructures only what the tests use: { dataDir, app, crew, alice, bot, repo }.
  • Formatting: the destructure line has spaces after the commas, the node:fs import is on one line, and the double blank line after afterAll is gone.
  • Other imports: I checked the rest of that file's imports and each one is used.
  • Timing: the file still takes about 37 s of the 45 s limit. I left the tests as they were. If it creeps up, the next step is to split it again.

I only touched the new file. test/crew.test.ts may have similar leftover names from the old setup; I didn't check it.

Approved

Test-only split of crew.test.ts into crew.test.ts (12 tests, ~15 s) and crew-early.test.ts (8 tests, ~37 s). The tests are moved unchanged, the imports each file keeps are all still used, and no app code, security surface or dependency changes. Nothing for the preview to show. Two things next: (1) crew-early.test.ts is at ~37 s of the 45 s limit, so split it again (pull-outcome tests vs. the cancel/early-fail tests) before it creeps; (2) the two files now carry copies of the same setup, so lift the shared beforeAll/settled wiring into helpers/crew-standin.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs