perf(test): split the six build-running artifact tests into parallel files - #8950
Conversation
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-31 22:17:30 UTC
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Decision record
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…files tests/artifacts.test.ts was 118.8s of the 144.3s shared-registry pass -- 82% of CI's test floor in one file. Six of its tests each ran a full scripts/build-artifacts.ts (7.2s-24.7s apiece, 99.4s combined), and vitest parallelizes across FILES, never within one; test.concurrent could not help either, because execFileSync blocks the whole worker. The only arrangement that overlaps the builds is separate files on separate workers. Move the four heaviest into sibling files -- artifacts-build-health, artifacts-build-schema, artifacts-build-determinism, artifacts-build-schema- index -- each with its own repo sandbox via the new tests/helpers/artifact-build-harness.ts factory (per-file sandbox + path helpers + support-artifact snapshot/restore, extracted from artifacts.test.ts). The extra ~0.6s clone per file is noise against a ~20s build. Locally the five files now finish in 61.5s wall with 165.8s of test time inside -- the slowest file is 38.6s, down from 118.8s. The split surfaced a hidden in-file ordering dependency: the llms.txt test runs the real build, which rm's + repopulates the staging dir WITHOUT an r2-manifest.json (that file is r2-manifest.ts's product, not the build's), and the two R2 upload tests 2000 lines later only found a manifest because the departed build tests' cleanup happened to recreate one. They now regenerate it themselves (memoized ensureStagingManifest), so they pass in any order and under vitest -t isolation, which they never did before. The moved tests' explicit timeouts go from 30s to 120s: they measured 21-25s in CI against the old 30s cap, a margin that already blew up on a loaded machine.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
52eb90f to
23708c1
Compare
Follow-up to #8937 / #8938.
Why
After #8938,
tests/artifacts.test.tsis 118.8s of the 144.3s shared-registry pass — 82% of CI's test floor in one file. Six of its tests each run a fullscripts/build-artifacts.ts(7.2–24.7s apiece, 99.4s combined), and vitest parallelizes across files, never within one.test.concurrentcannot help: the builds go throughexecFileSync, which blocks the whole worker. Separate files on separate workers is the only arrangement that overlaps them.What
artifacts-build-{health,schema,determinism,schema-index}.test.ts), each with its own repo sandbox via the newtests/helpers/artifact-build-harness.tsfactory (sandbox + path helpers + support-artifact snapshot/restore, extracted fromartifacts.test.ts). The ~0.6s clone per file is noise against a ~20s build.A latent bug the split surfaced
The llms.txt test runs the real build, which rm's + repopulates the staging dir without an
r2-manifest.json(that file isr2-manifest.ts's product, not the build's). The two R2 upload tests 2000 lines later only found a manifest because the departed build tests' cleanup happened to recreate one — a hidden in-file ordering dependency. They now regenerate it themselves (memoizedensureStagingManifest), so they pass in any order and undervitest -tisolation, which they never did before (verified:-tisolation fails on the pre-split file too).Verification
--isolate=false --fileParallelismvitest -tisolation on the two R2 tests