ci(typecheck): the pinned Node download overlaps the checkout, as it already does everywhere else #2547

Merged
jaylouisw merged 1 commit from ci/1124-0827 into main 2026-11-24 08:53:32 +00:00
Owner

The Typecheck job was the last of the three jobs that need a pinned Node still paying for the 45 MB nodejs.org tarball serially, in front of npm ci and the compiler. The smoke/Docker job and both test legs already start that download at the top of their checkout and let the git fetch run over it.

Baseline (measured, /actions/tasks to 2026-11-24T08:27Z)

  • Typecheck, 144 runs: median 22 s, p90 31 s, max 43 s.
  • Run 10539, task 27940 (Test? no - Typecheck), 08:29:10 -> 08:29:49 = 39 s on main.
  • Run 10308 (PR #2512), task 26856-era typecheck: 22 s.
  • The legs' own measured note puts the same tarball at 3.5-6.1 s of a leg whose checkout is 2.6 s, i.e. the download is the front of the job.

Change
The checkout step starts the pinned v22.23.5 download detached, before git init, into a staging directory renamed onto /opt/node-v22.23.5 only once bin/node is executable; the runtime step waits on a marker (bounded 60 s) and otherwise falls through to exactly the code it had: same bounded curl, same single retry, same [ -x ] assertion, same check-node-floor.js verdict.

Coverage unchanged — same pinned release, same symlink-over of node/npm/npx, same floor assertion, same tsc --noEmit / No any / check-module-paths steps in the same order.

After: to be filled from the first Typecheck run on this head (see the run ids in the comments below).

The Typecheck job was the last of the three jobs that need a pinned Node still paying for the 45 MB `nodejs.org` tarball **serially**, in front of `npm ci` and the compiler. The smoke/Docker job and both test legs already start that download at the top of their checkout and let the git fetch run over it. **Baseline (measured, `/actions/tasks` to 2026-11-24T08:27Z)** - `Typecheck`, 144 runs: median **22 s**, p90 31 s, max 43 s. - Run **10539**, task **27940** (`Test`? no - `Typecheck`), 08:29:10 -> 08:29:49 = **39 s** on `main`. - Run **10308** (PR #2512), task **26856**-era typecheck: 22 s. - The legs' own measured note puts the same tarball at 3.5-6.1 s of a leg whose checkout is 2.6 s, i.e. the download is the front of the job. **Change** The checkout step starts the pinned `v22.23.5` download detached, before `git init`, into a staging directory renamed onto `/opt/node-v22.23.5` only once `bin/node` is executable; the runtime step waits on a marker (bounded 60 s) and otherwise falls through to exactly the code it had: same bounded curl, same single retry, same `[ -x ]` assertion, same `check-node-floor.js` verdict. **Coverage unchanged** — same pinned release, same symlink-over of node/npm/npx, same floor assertion, same `tsc --noEmit` / `No any` / `check-module-paths` steps in the same order. **After:** to be filled from the first `Typecheck` run on this head (see the run ids in the comments below).
ci(typecheck): the pinned Node download overlaps the checkout, as it already does everywhere else
All checks were successful
CI / Typecheck (pull_request) Successful in 18s
CI / Test (Node 22) (pull_request) Successful in 52s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke and Docker build (pull_request) Successful in 1m10s
CI / Test (Node 24) (pull_request) Successful in 1m0s
CI / Arm auto-merge (pull_request) Successful in 5s
0229c877e8
The Typecheck job fetched its pinned runtime - 45 MB from nodejs.org, then 1.3 s of
unpack - at the start of the step after the checkout, serially, before `npm ci` or the
compiler could start. The other two jobs that need a pinned Node already start that
same download at the top of their checkout and let the git fetch run over it: the
smoke and Docker job (run 10300, task 26842: 3.78 s of unpack in the middle of a 48 s
job) and both test legs.

Measured baseline, /actions/tasks to 2026-11-24T08:27Z: Typecheck, 144 runs, median
22 s, p90 31 s, max 43 s (run 10539, task 27940, 39 s, 08:29:10-08:29:49). The legs'
own note puts the same tarball at 3.5-6.1 s against a 2.6 s checkout, so the same
overlap applies to the same 45 MB here.

So the download starts before `git init`, detached, into a staging directory that is
renamed onto /opt/node-v22.23.5 only when it is complete and executable; the runtime
step waits on a marker (bounded, 60 s) and falls through to exactly the code it had
before - same bounded curl, same single retry, same `[ -x ]` assertion, same
`check-node-floor.js` verdict - if the prefetch is late, killed or half-written.
Verified locally against all three paths: cold (one download, reused by the step),
prefetch failure (`.failed`, step fetches its own, no wait), and tree already present
(no download at all).

Coverage unchanged: same pinned v22.23.5, same symlink-over of node/npm/npx, the same
`check-node-floor.js` floor assertion, and the same tsc / no-any / module-paths checks
in the same order. Only the clock moves.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-24 08:47:28 +00:00
Author
Owner

After (measured on this change's own runs)

run job duration note
10544 (jobs/1) CI / Typecheck 18 s this head, normal load: its Test (Node 22) sibling took 52 s
10548 (jobs/1) CI / Typecheck 26 s first run on main after the squash merge, host loaded: tests 1m11s/1m12s against a 56 s median, i.e. ~27% slower than usual across the whole matrix

Baseline for the same job: median 22 s over 144 runs to 2026-11-24T08:27Z (p90 31 s, max 43 s); run 10539 / task 27940 on main was 39 s under load.

Like-for-like, using each run's own Test (Node 22) leg as the load control: typecheck/test22 was 22/56 = 0.39 before and 18/52 = 0.35 after, so the download overlap took ~4 s off the job, which is what the legs' own note predicts for a 45 MB tarball against a 2.6 s checkout (3.5-6.1 s, minus what the checkout already covered).

Coverage unchanged: same pinned v22.23.5, same symlink-over of node/npm/npx, same check-node-floor.js floor verdict, same tsc --noEmit / No any / check-module-paths steps in the same order. The prefetch cannot change the job's verdict: verified against all three paths (cold, prefetch failed, tree already present), and a .failed marker leaves the old bounded two-attempt fetch in place.

**After (measured on this change's own runs)** | run | job | duration | note | |---|---|---|---| | 10544 (jobs/1) | `CI / Typecheck` | **18 s** | this head, normal load: its `Test (Node 22)` sibling took 52 s | | 10548 (jobs/1) | `CI / Typecheck` | 26 s | first run on `main` after the squash merge, host loaded: tests 1m11s/1m12s against a 56 s median, i.e. ~27% slower than usual across the whole matrix | Baseline for the same job: **median 22 s** over 144 runs to 2026-11-24T08:27Z (p90 31 s, max 43 s); run 10539 / task 27940 on `main` was 39 s under load. Like-for-like, using each run's own `Test (Node 22)` leg as the load control: typecheck/test22 was 22/56 = 0.39 before and 18/52 = 0.35 after, so the download overlap took ~4 s off the job, which is what the legs' own note predicts for a 45 MB tarball against a 2.6 s checkout (3.5-6.1 s, minus what the checkout already covered). Coverage unchanged: same pinned `v22.23.5`, same symlink-over of node/npm/npx, same `check-node-floor.js` floor verdict, same `tsc --noEmit` / `No any` / `check-module-paths` steps in the same order. The prefetch cannot change the job's verdict: verified against all three paths (cold, prefetch failed, tree already present), and a `.failed` marker leaves the old bounded two-attempt fetch in place.
Sign in to join this conversation.
No description provided.