Uh oh!
There was an error while loading. Please reload this page.
docs(cli): re-measure the vitest suite-cost section on a stated commit (#12499) - #12524
Merged
Merged
Conversation
#12499) The section was dated 2026-08-20 and anchored to nothing, so the population moved under it while the figures went on reading as precise: 137 files / 1498 tests had become 185 / 2115 and 20 spawner files had become 39. Re-measured on 2f665a1, under this container's shared heavy-verify lock, with the contention actually seen recorded beside the numbers. Every figure now carries the commit it came from, the two inconsistent file/test vintages (135/1470 and 137/1498) collapse into one population stated once, and the header says which of its numbers are box-dependent and which are the ratios a reader on another box should expect to reproduce. Comment text only — the emitted config object is byte-identical. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 23 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Aug 26, 2026
os-litant
marked this pull request as ready for review
August 26, 2026 08:39
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#12499
Re-measures the suite-cost section of
packages/cli/vitest.config.tson astated commit, and collapses the file's two file/test vintages (135 / 1470 in
one section, 137 / 1498 in the next) into one measured population stated once.
Comment text only.
Extends #12494
(#12460), which tensed these sentences and declared the non-re-measure. This PR
is that re-measure; it does not re-open anything #12494 settled.
Why the old figures could not be re-checked
The section was dated
2026-08-20and anchored to nothing. Between that dateand
2f665a1afthe population it described moved twice over, and none of it wasvisible from inside the file:
2f665a1af--maxWorkers=2)A date says when someone looked. A commit says what they looked at, and only
the second can be re-checked — so the header now prints the sha beside the
numbers, and the counts live in exactly one place in the file.
What was measured, and how
One box, 4 cores, warm build,
vitest run --maxWorkers=2per package, vitest4.1.10 on node 22.22.2 — the 2026-08-20 protocol, re-run. Every run held the
container's shared heavy-verify lock (
scripts/pm/os-verify-lock.sh), becauseseveral agents share this box.
Contention actually seen, since a cost measurement taken beside a neighbour's
build is a reading about the box: the
--maxWorkers=2run waited 4m01s behinda neighbouring agent's
@objectstack/cli^...build, then held the lock 13m14s.The lock serialises locked work only — a neighbour's unlocked gate script
was observed at ~130% CPU partway through, and 1-minute load averaged 4.36
(peak 6.97) across the run.
Results
The one population, stated once
185 files / 2115 tests on
2f665a1af, all passing. Both stale copies(135 / 1470, 137 / 1498) are gone; the count now appears in exactly one
place in the file, and the
Why the service-cache entrysection points at itrather than keeping a second copy.
Concentration — re-measured, and it moved in two directions at once
2f665a1af⭐ The two shares moved in opposite directions, and that is the finding: the
spawner set nearly doubled, so it now holds almost the whole wall (56.1% ->
89.4%) while the top-20 concentration fell (87.7% -> 71.3%) because the same
kind of cost is spread over more files. Reading either number alone gives the
wrong story. All twenty of the top 20 are spawners.
"File wall" is now defined in the header as the sum of per-module run durations,
which is the same quantity vitest prints as the
teststerm of its ownDurationline — so the two can be checked against each other instead ofdrifting.
All six rows of the cross-package table are one vintage
Refreshing only the
clirow would have left the "both normalisers" argumentcomparing 2026-08-26 against 2026-08-20, so all six packages were re-run on
2f665a1af, plus a secondclirun at--maxWorkers=4for the worker A/B anda fresh
NODE_COMPILE_CACHEA/B. Nine measured runs in total, all green.example-showcasefailed 9 of 26 files the first time —Failed to resolve entry for package "@objectstack/connector-rest", i.e. packages outside thecliclosure I had built. A red suite's wall is not a cost measurement, so itsclosure was built and it was re-run green (26 files / 364 tests) before entering
the table. In CI this cannot happen: turbo's default
testtask declaresdependsOn: ["^build"].Per-spawn floor — absolutes moved, the ratio held
2f665a1aftsx bin/run-dev.js --versionnode bin/run.js --versionnode -e 0⭐ Exactly the #11707 precedent: the seconds did not reproduce, the ratio did.
The header now says which of its numbers are box-dependent (all the seconds) and
which a reader on another box should expect to reproduce (the ratios).
By entry point, and a trap in reading it
bin/run-dev.js(source)bin/run.js(built)⛔ That is not a measurement of what the two entries cost — the four built-entry
files are also the smallest here (2.0 tests/file against 8.9) and per test the
ordering reverses. The header says so, and points at the floor table for the
entry cost. Re-deriving 3.3x from this row would have been wrong in the same way
that scaling the old figures by 2.06x would have been.
Instrument controls
⛔ Nothing here reports a zero or an "unchanged" that the instrument was not
first shown capable of contradicting:
0.530-0.535s, a 2000ms one reads 2.024-2.032s.
node bin/run-NOPE.js --version(an entry that does notexist) returns in 0.030s and exit 1: pure timing reads a nonexistent
command as the best floor on the board. Every floor row was checked for
exit 0.
setup 0ms— the reporter was re-run against a deliberate 300mssetup file and printed
setup 618ms(2 modules), so the zero is a fact aboutthe suite, not a blind spot.
contents (2 files / 3 tests / 617ms wall, one test made to cost 400ms), and
it reports both extremes in the real run (0.000s and 93.96s).
are known before it was pointed at the real ones.
known present returns its lines.
those files assemble the entry from separate literals
(
join(…, '..', 'bin', 'run-dev.js')), so a slash-joined pattern missed themwhile still returning a plausible number. Prose mentions were excluded the
other way — one file names the entry four times and explicitly does not spawn
it. Both traps are now written into the header.
run over
c48f9a0e7(which did change code in this file: 7 lines reported)and over
3d8d2f15d(comment-only: silent) before being trusted here.Scope
packages/cli/vitest.config.tsonly, comment text — the emitted config objectis byte-identical. The four
dist-consuming test files, the three spawners#12441 is in flight on, and
turbo.jsonare untouched.skip-changeset:nothing published changes.
nothing in it was rewritten.
testsis still the dominant term by a widermargin than before (1353.09s against 203.72s import and 25.17s transform), so
"before adding a
testblock, re-measure: iftestsis still the dominantterm, the block is not the lever" still points the right way. Two supporting
figures moved and were restated rather than re-argued — both verdicts stand:
(
specis below it at 0.036s/file). The claim it supports — the widedependency closure is not what the test files import — is if anything
stronger, since
cliis now second-lowest on import per file too.NODE_COMPILE_CACHEA/B no longer reads as "inside noise": cached(5.15/5.16/5.34/5.42s) and uncached (5.46/5.61/5.64/5.71s) do not overlap
across four samples each. It is still rejected — ~0.3s (~5%) for 42MB, against
the 3.11s the built entry already saves per spawn.
Generated by Claude Code