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

Red after landing: #17015 broke test/big-clone.test.ts #17219

opened this in answer to

Merged 38h 37m ago, live in production

I split test/big-clone.test.ts into two files so each stays under the 20 s file budget. bun x tsc --noEmit is clean. I ran the two big-clone files with bun test and did not run scripts/design-lint.ts, because no web page changed.

Notes

opened this

I split test/big-clone.test.ts into two files so each stays under the 20 s file budget. bun x tsc --noEmit is clean. I ran the two big-clone files with bun test and did not run scripts/design-lint.ts, because no web page changed. The 41.7 s figure only appeared under the forge's full-suite load, so I haven't confirmed the budget holds there.

  • What was slow: test/big-clone.test.ts took about 25 s here against the 20 s budget. #17015's migration and the test files it touched don't look like the cause, but I didn't investigate the bisect further. The file mixes throttled-link clone timing with a second block that starts a full app, seeds an admin and creates repos.
  • The change: I moved that second block ("a fetch by object id is a read like any other", 3 tests) and its small helpers into a new test/big-clone-by-id.test.ts. The tests are unchanged. test/big-clone.test.ts now runs in about 16 s alone, and the new file takes the rest. Together the two files still run the same 15 tests, all passing.
  • Not reproduced: test/spawn-app-links.test.ts (11 s) and test/issue-fit.test.ts (3 s) pass cleanly on their own here, with no failures. I made no change to them. I take them to be load-related noise from the same bisect window, and the forge's check on this push will tell.
  • Not done: I did not add big-clone to the SLOW list in scripts/gate.ts; that would have hidden the time instead of fixing it.
  • Reuse: I didn't run scripts/similar.ts; the new file adds no new functions, only the existing git, ok and missing helpers copied from the original.

To try it: bun test test/big-clone.test.ts test/big-clone-by-id.test.ts.

Closes #17116

commented

I split test/big-clone.test.ts into two files so each stays under the 20 s file budget. bun x tsc --noEmit is clean. I ran the two big-clone files with bun test and did not run scripts/design-lint.ts, because no web page changed. The 41.7 s figure only appeared under the forge's full-suite load, so I haven't confirmed the budget holds there.

  • What was slow: test/big-clone.test.ts took about 25 s here against the 20 s budget. #17015's migration and the test files it touched don't look like the cause, but I didn't investigate the bisect further. The file mixes throttled-link clone timing with a second block that starts a full app, seeds an admin and creates repos.
  • The change: I moved that second block ("a fetch by object id is a read like any other", 3 tests) and its small helpers into a new test/big-clone-by-id.test.ts. The tests are unchanged. test/big-clone.test.ts now runs in about 16 s alone, and the new file takes the rest. Together the two files still run the same 15 tests, all passing.
  • Not reproduced: test/spawn-app-links.test.ts (11 s) and test/issue-fit.test.ts (3 s) pass cleanly on their own here, with no failures. I made no change to them. I take them to be load-related noise from the same bisect window, and the forge's check on this push will tell.
  • Not done: I did not add big-clone to the SLOW list in scripts/gate.ts; that would have hidden the time instead of fixing it.
  • Reuse: I didn't run scripts/similar.ts; the new file adds no new functions, only the existing git, ok and missing helpers copied from the original.

To try it: bun test test/big-clone.test.ts test/big-clone-by-id.test.ts.

commented

I split test/big-clone.test.ts in two and moved the shared git helpers into one module. #17015 did not add the cost, so the split fixes a file that was already near the budget.

  • Helpers: Run, git, ok and missing now live once in test/helpers/git-run.ts. Both big-clone files import them, and the by-id file no longer carries a copy. tsc is clean and the 15 tests pass.
  • Was #17015 the cause? No. I ran test/big-clone.test.ts alone, unsplit, at the commit before #17015 and at #17015:
    • Before #17015: 24.9 s.
    • At #17015: 21.5 s.
    • Neither run is under the 20 s budget, and #17015 did not make the file slower.
    • The file already sat just over the budget. Its timer-driven tests (throttled and stalled clones) take about 12 s of wall clock on their own. The bisect most likely landed on #17015 because that run was loaded and went over.
  • Why the split is the fix: the throttled-link tests stay in big-clone.test.ts and the app-booting tests move to big-clone-by-id.test.ts. Alone, that leaves the main file near 16 s and the by-id file near 5 s. Together they took 28.7 s in one run on this box, so the headroom is real but not large.
  • What I could not check: I can't see the forge's full-suite figures from here. The forge's check on this push is the evidence for the 41.7 s load case. I didn't open test/spawn-app-links.test.ts or test/issue-fit.test.ts this round, and their load-related cause is still a guess. They pass alone (11 s and 3 s), and #17015 touched neither them nor anything they exercise that I found. If the check still reports them red, that needs a separate look.

To try it: bun test test/big-clone.test.ts test/big-clone-by-id.test.ts.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs