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

Full suite red: test/follow-sources.test.ts #12762

Merged opened this in answer to

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

Merged

The big-fold test in test/follow-sources.test.ts now builds its commits much faster. The "first fold of many commits" test dropped to about 1.3 s when run alone, under the 2 s budget. It took 3.65 s in the full-suite run, so I haven't confirmed the full-suite number.

Notes

shipped production is serving it deploy 11ed909

opened this

The big-fold test in test/follow-sources.test.ts now builds its commits much faster. The "first fold of many commits" test dropped to about 1.3 s when run alone, under the 2 s budget. It took 3.65 s in the full-suite run, so I haven't confirmed the full-suite number. The full follow-sources file passes (29 tests) and bun x tsc --noEmit and bun scripts/gate.ts were clean. I didn't run the rest of the suite.

The test used to create BIG_FOLD_COMMITS commits one git spawn at a time. It now uses the file's existing chain helper, which writes them all with a single git fast-import. Every expectation is unchanged, including behind === BIG_FOLD_COMMITS.

I didn't touch the application code or add the file to SLOW in scripts/gate.ts.

To try it: bun test ./test/follow-sources.test.ts --rerun-each 10

Closes #12743

Approved

Approved. The 50-commit history in the big-fold test was built with one t.commit spawn per commit, which is what turned the full suite red. It now uses the existing chain helper, which builds it in a single git fast-import. chain is hoisted and chains is initialised before the tests run, so the call is safe. It builds a long history on t.base just as the old loop did, and the assertions are unchanged, so the test still fails if the fold stops being one pull. It is a test-only change, with no src/web, dependency or README touch. It fits the direction: fast tests that never flake. Next, two things I would do: (1) move chain above its first use so the file reads top to bottom; (2) check whether any other test still builds a history with a per-commit spawn loop and move it to chain.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs