ci(docker): the smoke job runs Node 20, below the repo's 22.18 floor, so a .ts engine module cannot load #2488

Closed
opened 2026-11-23 23:29:08 +00:00 by jaylouisw · 0 comments
Owner

What

The Server smoke and Docker build job runs its steps in the runner's ubuntu-latest container, which is
node:20-bookworm — Node v20.20.2, printed by the job's own "Which runtime is running this" step. That is
below the floor package.json declares ("engines": { "node": ">=22.18.0" }) and below the release Node needs
before type stripping is on with no flag. It went unnoticed because until now no .ts file was on a runtime
path: the converted files under scripts/ are only run by explicit node scripts/x.ts invocations and by
scripts/run-tests.js, and this job runs neither.

engine/segment.ts (the first converted engine module, #2483) loaded from engine/simulator.js is on that path,
and the smoke test now dies there:

--- node scripts/smoke-http.js ---
  FAIL server did not start — server did not answer /api/catalog within the timeout
    at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
    at Object.<anonymous> (/workspace/jaylouisw/packetforge/engine/simulator.js:116:20)
Node.js v20.20.2
::error title=Server smoke test::scripts/smoke-http.js exited 1

engine/simulator.js:116:20 is require('./segment.ts'). The image build in the same job is green
(Step 8/8 ... Successfully built), so this is the runtime of the job, not the Dockerfile. The three Test
legs pass because they download and run Node 22 and 24 themselves.

Why it matters now

Every later conversion adds another .ts file to that path, so the first one turns this job red permanently
until it runs on a runtime that can load the language the repository writes. It also means the smoke test is
currently the one gate that never exercises the code as engines.node says it may be run.

The way forward

The likely fix is the job's own runtime rather than the code: give the docker job a container at or above the
floor (node:22-bookworm), or run the smoke step under a downloaded Node 22/24 the way the test legs already do,
and then re-check the socket/apt-get paths the job's comments describe for the host daemon. Recorded here
rather than guessed at, because the job's step order and its docker-socket handling are load-bearing and its
comments document several past failures.

Found while converting engine/segment.js; the pull request that surfaced it is #2483.

## What The `Server smoke and Docker build` job runs its steps in the runner's `ubuntu-latest` container, which is `node:20-bookworm` — **Node v20.20.2**, printed by the job's own "Which runtime is running this" step. That is below the floor `package.json` declares (`"engines": { "node": ">=22.18.0" }`) and below the release Node needs before type stripping is on with no flag. It went unnoticed because until now no `.ts` file was on a *runtime* path: the converted files under `scripts/` are only run by explicit `node scripts/x.ts` invocations and by `scripts/run-tests.js`, and this job runs neither. `engine/segment.ts` (the first converted engine module, #2483) loaded from `engine/simulator.js` is on that path, and the smoke test now dies there: ``` --- node scripts/smoke-http.js --- FAIL server did not start — server did not answer /api/catalog within the timeout at Module._extensions..js (node:internal/modules/cjs/loader:1623:10) at Object.<anonymous> (/workspace/jaylouisw/packetforge/engine/simulator.js:116:20) Node.js v20.20.2 ::error title=Server smoke test::scripts/smoke-http.js exited 1 ``` `engine/simulator.js:116:20` is `require('./segment.ts')`. The image build in the same job is green (`Step 8/8 ... Successfully built`), so this is the runtime of the *job*, not the Dockerfile. The three `Test` legs pass because they download and run Node 22 and 24 themselves. ## Why it matters now Every later conversion adds another `.ts` file to that path, so the first one turns this job red permanently until it runs on a runtime that can load the language the repository writes. It also means the smoke test is currently the one gate that never exercises the code as `engines.node` says it may be run. ## The way forward The likely fix is the job's own runtime rather than the code: give the `docker` job a container at or above the floor (`node:22-bookworm`), or run the smoke step under a downloaded Node 22/24 the way the test legs already do, and then re-check the socket/`apt-get` paths the job's comments describe for the host daemon. Recorded here rather than guessed at, because the job's step order and its docker-socket handling are load-bearing and its comments document several past failures. Found while converting `engine/segment.js`; the pull request that surfaced it is #2483.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#2488
No description provided.