ci: the smoke job runs on the floor runtime, because the source is TypeScript now #2491

Merged
jaylouisw merged 1 commit from ci/smoke-floor into main 2026-11-23 23:37:01 +00:00
Owner

The first converted module broke a job that had no runtime guarantee, and the crash stack says exactly why:

simulator.js:116:20   ← require('./segment.ts')

Server smoke and Docker build runs on the runner image's Node 20.20.2, and engine/segment.ts cannot be loaded below 22.18 — type stripping is what makes a .ts file runnable at all. So the job driving the API end to end was testing a tree it cannot load, while its image build passed beside it. Filed as #2488; this is the fix.

Why the old design stopped being valid. This job deliberately printed its runtime rather than asserting one, on the argument that the matrix holds the version line and this job only exercises the HTTP surface. That held while every file the smoke client loaded was JavaScript. A .ts module in the server's require graph makes the runtime a property of the tree under test, not a preference — so the step now asserts the floor and names it in the failure.

What changes (.forgejo/workflows/ci.yml, the docker job only):

Step Before Now
Provide the runtime the smoke client needs — Installs the same pinned v22.23.5 tarball the Typecheck job and the test legs use, symlinked over the image's Node
Which runtime is running this node --version && npm --version The same print, then a case that fails with ::error title=Server smoke and Docker build::… below the 22.18 floor the repo declares

Nothing else moves: same smoke script, same 180 s bound, same eight Dockerfile static checks, same ::error titles, same detach-and-report shape. The provisioning step keeps the job's if: guard, so a data-only diff still skips it exactly as before, and the tarball is not re-downloaded if a previous step already unpacked it.

Evidence this is the whole failure and not a coincidence

  • The failing job's log showed the Node version it ran under (v20.20.2/npm 10.8.2 in the EBADENGINE warning) and the SyntaxError: Missing initializer in const declaration that Node 20 produces when it parses const x: T as JavaScript.
  • Typecheck + Test (Node 22) + Test (Node 24) were green on the same commit: they already provision 22/24.
  • The fix is the same block that took the Typecheck job from 11 s red to green in #2477, so it is proven in this workflow rather than proposed.

Gates: node scripts/check-ci-disk-hygiene.js exit 0 (7 workflow files), node scripts/syntax-check.js 548 files all OK. This PR touches no source file, so the suite is unaffected — the proof is the smoke job on this PR itself: it must go green having asserted v22.x.

**The first converted module broke a job that had no runtime guarantee, and the crash stack says exactly why:** ``` simulator.js:116:20 ← require('./segment.ts') ``` `Server smoke and Docker build` runs on the runner image's **Node 20.20.2**, and `engine/segment.ts` cannot be loaded below **22.18** — type stripping is what makes a `.ts` file runnable at all. So the job driving the API end to end was testing a tree it cannot load, while its image build passed beside it. Filed as **#2488**; this is the fix. **Why the old design stopped being valid.** This job deliberately *printed* its runtime rather than asserting one, on the argument that the matrix holds the version line and this job only exercises the HTTP surface. That held while every file the smoke client loaded was JavaScript. A `.ts` module in the server's require graph makes the runtime a **property of the tree under test**, not a preference — so the step now asserts the floor and names it in the failure. **What changes** (`.forgejo/workflows/ci.yml`, the `docker` job only): | Step | Before | Now | |---|---|---| | `Provide the runtime the smoke client needs` | — | Installs the same pinned `v22.23.5` tarball the Typecheck job and the test legs use, symlinked over the image's Node | | `Which runtime is running this` | `node --version && npm --version` | The same print, then a `case` that fails with `::error title=Server smoke and Docker build::… below the 22.18 floor the repo declares` | Nothing else moves: same smoke script, same 180 s bound, same eight Dockerfile static checks, same `::error` titles, same detach-and-report shape. The provisioning step keeps the job's `if:` guard, so a data-only diff still skips it exactly as before, and the tarball is not re-downloaded if a previous step already unpacked it. **Evidence this is the whole failure and not a coincidence** - The failing job's log showed the Node version it ran under (`v20.20.2/npm 10.8.2` in the `EBADENGINE` warning) and the `SyntaxError: Missing initializer in const declaration` that Node 20 produces when it parses `const x: T` as JavaScript. - Typecheck + `Test (Node 22)` + `Test (Node 24)` were green on the same commit: they already provision 22/24. - The fix is the same block that took the Typecheck job from 11 s red to green in #2477, so it is proven in this workflow rather than proposed. **Gates:** `node scripts/check-ci-disk-hygiene.js` exit 0 (7 workflow files), `node scripts/syntax-check.js` 548 files all OK. This PR touches no source file, so the suite is unaffected — the proof is the smoke job on this PR itself: it must go green having asserted `v22.x`.
ci: the smoke job runs on the floor runtime, because the source is TypeScript now
All checks were successful
CI / Server smoke and Docker build (pull_request) Successful in 31s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 13s
CI / Typecheck (pull_request) Successful in 19s
CI / Test (Node 22) (pull_request) Successful in 47s
CI / Test (Node 24) (pull_request) Successful in 50s
CI / Arm auto-merge (pull_request) Successful in 3s
f63d5a97e3
Run 10054: the job that drives the API end to end went red with
`simulator.js:116:20` in the crash stack while its image build passed beside it. The
runner image ships Node 20.20.2 and the file it tried to load was `engine/segment.ts`,
which cannot be loaded below 22.18 - so the job was testing a tree it cannot run.

This job used to print its runtime rather than assert it, on the argument that the matrix
holds the version line and this job only exercises the HTTP surface. That argument expired
with the first converted module: a .ts file in the server's require graph makes the runtime a
property of the tree under test.

Same pinned tarball, same symlink-over and same assertion as the Typecheck job. Filed as
part of #2488.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-23 23:36:33 +00:00
Sign in to join this conversation.
No description provided.