⚡ Remeasure test weights at ed5369fc and recalibrate the runtime shards - #721
Open
taras wants to merge 6 commits into
Open
⚡ Remeasure test weights at ed5369fc and recalibrate the runtime shards#721taras wants to merge 6 commits into
taras wants to merge 6 commits into
Conversation
…oors The committed weights were measured at 170a021, fifty commits back; 43 Deno, 32 Node and 31 Bun files had no weight and ran at the corpus maximum, so the partition predicted 587/634/909ms-thousands per shard and every runtime ran over the 300s ceiling on main (run 33574538193: Deno 399s, Node 388s, Bun 491s). test-weights.json is byte-for-byte the product of measure-test-weights run 33576103883 at ed5369f on ubuntu-latest (deno 2.9.5, node v22.23.2, bun 1.3.14). Every applicable file is measured. Serial sums: Deno 2596s (370 files), Node 1118s (286), Bun 715s (285); floors 9/4/3, installed here as the calibration's starting counts.
PR #721: ⚡ Remeasure test weights at ed5369f and recalibrate the runtime shards2 files, +939 / -833 Scope🔴 PR has 1772 lines changed. Split into focused PRs. 🟡 1772 lines changed. PRs under 400 receive more thorough review. Structural✅ No structural bloat detected. Slop✅ Slop indicators look low. Static Analysis✅ Oxlint found no issues. CorrectnessNo extraneous code patterns detected. |
Run 33581198496 at 1ea893b (9/4/3): Deno worst Test step 357s, window 373s; Node worst 452s, window 459s; Bun worst 282s but window 338s. Each runtime increments by one, per the rule in specs/testing-spec.md.
…t 10/5 Run 33581898672 at 1981e9b (10/5/4): Deno worst Test step 323s, window 332s; Node worst 334s, window 345s; Bun passed at 225s. Deno and Node increment by one; Bun holds.
Run 33582364710 at 5bc7e0a (11/6/4): Node worst Test step 301s. Every Deno step passed (worst 298s); its 409s window is 124s of runner queueing on a 33-job run, which the shard count cannot shorten, so Deno holds at 11 pending a decision on the window clause. Bun passed at 218s.
Run 33582959074 at 8746706 (11/7/4): Deno shard 4/11 took 323s against a 236s prediction; Node passed at 251s and Bun at 223s. Deno increments by one; Node and Bun hold.
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 free
to 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.
Why
Every runtime's shards run over the 300 s ceiling
specs/testing-spec.mdsets. Onmainat 392c006 (run 33574538193, the one that opened #714) the worstTeststeps were Deno 399 s, Node 388 s and Bun 491 s. The committed weights dated from 170a021, fifty commits back: 43 Deno, 32 Node and 31 Bun files had no weight and were charged the corpus maximum, sotest-deno (6/9)predicted 587 s for itself and the split balanced nothing real.What changes
Before:
test-weights.jsonmeasured at 170a021; counts 9/5/2; predicted per-shard totals 587 s (Deno), 634 s (Node), 909 s (Bun) with the fallback files.After:
test-weights.jsonis byte-for-byte the artifact of measure-test-weights run 33576103883, dispatched ated5369fconubuntu-latest(deno 2.9.5 / node v22.23.2 / bun 1.3.14; provenance in the file'ssourceblock). Every applicable file in all three runtimes is measured; the fallback set is empty. The corpus grew: serial sums Deno 2596 s (370 files, was 1939 s), Node 1118 s (286, was 760 s), Bun 715 s (285, was 429 s). The measured lower bounds are 9/4/3, andci.ymlinstalls them as the calibration's starting counts, predicting 289/280/238 s per shard.Calibration
Per the spec's rule: five consecutive runs on one fixed head keep every shard
Teststep and each runtime's execution window under 300 s; a miss increments only that runtime and starts a fresh five. #606 measured runners executing 15–50% above the isolated per-file weights, so the Deno floor is expected to miss; the table below records each head as it runs.1ea893b81981e9b15bc7e0ad8746706277d4cbc604ca08bfmainmoved (below)mainadvanced to a7f60c0 during the sequence: #718 addedpackages/cli/tests/stdout-delivery.test.ts(a corpus change — an unmeasured file is charged the Deno maximum, 97 s, so the partition on a rebased head would differ) and the workflows moved Bun from 1.3.14 to 1.4.0. Both are remeasure triggers, so a second measurement was dispatched at a7f60c0 (run 33585991716); the branch will be rebased, carry that artifact, and run its five on the rebased head.The window clause measures the account's runner queue as well as the partition. Run 33582364710 overlapped #718's CI run (02:09–02:18 against 02:12–02:20); the account runs about 20 jobs at once and the two runs held 33 and 30, so a third of this run's shards waited for a slot —
test-deno (5/11)'sTeststep began 124 s aftertest-deno (2/11)'s, and Deno's 409 s window was that skew on a 285 s test with every step under 300 s. The next run had the account to itself and every window sat 2–11 s over its worst step, as #606's did. So the clause is satisfiable, but a fixed head's five consecutive runs can lose one to another branch pushing at the same time, and that miss says nothing about the count. Node's 301 s step at 6 and Deno's 323 s step at 11 were genuine misses and incremented.Runner overhead over the isolated weights, by runtime, across these runs: Deno +24–37%, Bun +23–26%, Node +49–62%.
How to verify it
scripts/tests/ci-workflow.test.ts"the actual partition the workflow installs" proves the committed corpus, exclusions, weights andci.ymlcounts form a complete, disjoint split with no empty shard — the count-sensitive test, soci.ymlstays the single count encoding.ci-workflow,test-shards,test-weights,runtime-tests,shard-execution,measure-test-weights,runtime-exclusions,test-file-discovery:ok | 27 passed (116 steps) | 0 failed.0unmeasured.Scope
Included
test-weights.json, byte-for-byte from the measurement artifact (sha256858f27d1…d4604).ci.ymlshard counts, calibrated by the five-run rule.Intentionally unchanged
plan.test.tsflake that actually reddenedmainis 🐛 Keep the session-name assertion off the random profile root (#714) #716.Generated or mechanical changes
test-weights.jsoncomes from.github/workflows/measure-test-weights.yml; no millisecond was edited by hand.Scope confirmation