You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Release quality gate: whole-tree bun test takes ~30 min; find and fix the slow files #1839
The whole-tree bun test that the release quality gate runs from the repo root now takes about 30 minutes: 32, 36 and 31 minutes on the last three successful releases (runs 43383293210, 43364927702, 43145815696), and 29.3 minutes on run 43557002385 (23,137 pass, 0 fail, 1,310 files). That is about 1.3 s per file on average, and it makes every release wait around 40 minutes in the quality job alone. Nobody has measured which files the time goes to.
Acceptance Criteria
A per-file timing list for the root bun test run is produced (file, wall time), with the command used to produce it, and attached to this issue.
The 20 slowest files are named in this issue, each with its time.
Either the root bun test finishes in under 20 minutes on the release runner (shown by a release or CI run's step time), or each of the 20 slowest files that stays slow has a stated reason in this issue (for example: golden fixture size, real network, a deliberate timing test).
No test is deleted or skipped to get there without a note in the PR saying what it covered and where that coverage now lives.
Per-file timing for #1839. Every one of the 1,487 test files bun discovers (same discovery as scripts/test-suites.ts) was run alone, one file per invocation, from the repo root on public main 9994763 (48-core sandbox, bun 1.4.4). The solo times add up to 1,546.8 s (25.8 min). They are an upper bound for the golden files: in one whole-tree process those share the memoized canonical captures in helpers/golden-baseline.ts, so only the first file pays.
Exit codes: all 1,487 exited 0 except apps/cli/tests/batch/run.test.ts (exit 1 solo although its output reads 29 pass, 0 fail; not investigated here). The 'before' column is the solo time before #2186, 'after' the re-time.
Two concurrent CLI runs over a 6 MiB page (:12-14, past the documented 5 MiB cap); the cap test needs a >10 s parse bounded by a 20 s budget (:101-114). Deliberate.
Fixture DB now copied from the shared canonicalFixtureDb instead of regenerated per test. Rest is two full runStreamingRules passes over the 518-page corpus (~17 s each, :66-90, :99-103), each with different assets.
Already uses canonicalV1Snapshot/V2Snapshot (:55-56); solo time is the two engine captures of the 500-page golden corpus. Shared when run with sibling golden files.
Hostile 5 MB and 10 MiB single pages of secret-shaped values, with the collector budget lifted to 600 s (:82); sizes are the point (cap, retention). Plus GC settling per test (:46-56).
8
apps/cli/tests/cli/audit-max-duration-e2e.test.ts
26.0s
unchanged
Real-time budget tests (BUDGET_S 3 s / 5 s, 700 ms page delay, 3 s slow assets); concurrent ones already overlap (~10 s each). Making the 7 sub-second validation tests concurrent was tried: no measurable gain (25.5s), reverted.
13 tests, each builds its own seeded crawl (:112-137) and runs the engine several times (fresh vs replayed byte-compare); that is the coverage.
10
packages/crawler/tests/preamble-budget.test.ts
20.6s
unchanged
Real stalls with tight elapsed-time assertions: three tests wait the 1.5 s preamble budget (~3 s each) and the walk tests stall bodies (:160-230, :345-460). Kept serial so timing bounds do not see each other's load.
One test (10 s) serves a 600 ms TTFB on every path against a 400 ms deadline (:69-79, :175-185) so each probe and the entry retry hit real timeouts; that is the scenario.
Wall-clock comparison of a flat vs ramped crawl of 25-page-per-slot corpus at 25 ms latency (:62-66); asserts ramped < 0.85 x flat, so the latency cannot be shrunk without noise.
19
scripts/install-hardening-168.test.ts
14.1s
1.7s
Each install() already runs in its own mkdtemp root with its own shims, HOME and process group; all tests now test.concurrent (same approach as install-contract, f0c1a6d). 3 repeat runs stable, 36 pass.
20
apps/cli/tests/commands/feedback-cli.test.ts
13.9s
unchanged
Two tests wait the CLI's real 5 s stdin-idle give-up (~5.4 s each); they share the stub server's received array (:11-13, :243, :256), so running them concurrently would race.
The full list is split across three comments because GitHub caps a comment at 65,536 characters (rows 1-500 here, 501-1,000 and 1,001-1,487 in the next two).
AC1 PASS: per-file times for all 1,487 files plus the exact command are in the three timing comments above.
AC2 PASS: the 20 slowest files with times are in the first comment (slowest: audit-max-duration-large-page-1332-e2e at 40.2 s).
AC3 PASS via the second branch: the criterion accepts a stated reason for each of the 20 slowest files that stays slow, and the first comment gives a file:line reason for 17 of them. test(install,audit-engine): concurrent install-hardening and attestation cases, shared canonical DB in javascript-shipped #1839 #2186 sped up the other 3: install-hardening-168 14.1 s to 1.7 s, install-attestation-169 9.0 s to 3.1 s, javascript-shipped-report 36.4 s to 34.8 s. The under-20-minute route was not shown; the solo times sum to 25.8 min.
Caveats: apps/cli/tests/batch/run.test.ts exited 1 when run solo despite 29 pass, 0 fail in its output. It is not part of this issue and is worth a separate look. The 30-minute whole-tree run is only the release fallback since #1840 (the gate skips the re-run when main CI passed at the same sha). Parallel suite jobs would be the next lever if the fallback matters again.
Activity
build(ci): release quality gate reuses main CI's test jobs when they …
build(ci): release quality gate reuses main CI's test jobs when they …
test(audit-engine): capture canonical golden fixture once per process #…
test(audit-engine): deep-freeze shared canonical golden snapshots #1839
test(cli): skip the per-host politeness sleep in audit wiring tests #…
test(cli): skip the per-host politeness sleep in audit wiring tests #…
test(rules): build and parse giant integrity fixtures once, size nest…
test(rules): build and parse giant integrity fixtures once, size nest…
build(cli): pin NODE_ENV to production in the release binaries #1839
fix(build): keep --compile --splitting --minify contiguous after the …
build(cli): pin NODE_ENV to production in the release binaries #1839
15 remaining items
test(cli): test-only knobs for the max-duration margin floor and star…
build(cli): pin NODE_ENV to production in the release binaries #1839
fix(build): keep --compile --splitting --minify contiguous after the …
build(cli): pin NODE_ENV to production in the release binaries #1839
fix(build): keep --compile --splitting --minify contiguous after the …
test(cli): test-only knobs for the max-duration margin floor and star…
test(cli): test-only knobs for the max-duration margin floor and star…
test(cli): test-only knobs for the max-duration margin floor and star…
test(install,audit-engine): run install-hardening and attestation cas…
Merge origin/main into boat/targeted-site-rules-1778
nc9 commentedon Nov 21, 2026
Per-file timing for #1839. Every one of the 1,487 test files bun discovers (same discovery as
scripts/test-suites.ts) was run alone, one file per invocation, from the repo root on public main 9994763 (48-core sandbox, bun 1.4.4). The solo times add up to 1,546.8 s (25.8 min). They are an upper bound for the golden files: in one whole-tree process those share the memoized canonical captures inhelpers/golden-baseline.ts, so only the first file pays.Exit codes: all 1,487 exited 0 except
apps/cli/tests/batch/run.test.ts(exit 1 solo although its output reads 29 pass, 0 fail; not investigated here). The 'before' column is the solo time before #2186, 'after' the re-time.20 slowest files
receivedarray (:11-13, :243, :256), so running them concurrently would race.The full list is split across three comments because GitHub caps a comment at 65,536 characters (rows 1-500 here, 501-1,000 and 1,001-1,487 in the next two).
Files 1-500, slowest first
Command used (from #2186), run with
files.txtholding the discovered test files, one path per line:nik
nc9 commentedon Nov 21, 2026
Continuation of the per-file timing list: rows 501-1,000, slowest first.
Files 501-1,000, slowest first
nik
nc9 commentedon Nov 21, 2026
Continuation of the per-file timing list: rows 1,001-1,487, slowest first.
Files 1,001-1,487, slowest first
nik
nc9 commentedon Nov 21, 2026
Grading against public main (shipped in #2186):
Caveats: apps/cli/tests/batch/run.test.ts exited 1 when run solo despite 29 pass, 0 fail in its output. It is not part of this issue and is worth a separate look. The 30-minute whole-tree run is only the release fallback since #1840 (the gate skips the re-run when main CI passed at the same sha). Parallel suite jobs would be the next lever if the fallback matters again.
nik