[E00-S01-T08] Node engine restricted to 24.x #375

Merged
kpcto merged 3 commits from feature/161 into main 2026-08-28 09:18:24 +00:00
Member

What changed

Restricts the workspace to the Node 24.x engine line for [E00-S01-T08] Node engine restricted to 24.x (#161), and makes both acceptance criteria enforceable rather than incidental:

  • package.json — adds "engines": { "node": ">=24.0.0 <25.0.0" } (exactly the 24.x line) to the root manifest. Lockfile untouched (engines is not part of the pnpm lockfile).
  • pnpm-workspace.yaml — adds engineStrict: true. pnpm 11 no longer honors engine-strict from .npmrc for non-auth settings (settings live in pnpm-workspace.yaml, camelCase); with engineStrict, an unsupported Node version is a hard install error (ERR_PNPM_UNSUPPORTED_ENGINE) instead of a warning. Verified against the committed pnpm 11.23.0: plain .npmrc engine-strict=true is ignored by pnpm 11, top-level engineStrict: true in pnpm-workspace.yaml is enforced.
  • tests/node-engine.test.mjs (new) — a node:test suite (zero dependencies, lockfile untouched) that fails if the restriction ever drifts, including a minimal embedded semver range checker (no semver dependency).
  • docs/development/non-container.md — prerequisite + troubleshooting rows updated: they previously described the T08 restriction as future work and claimed "Any Node ≥ 22 is enough"; Node 24.x is now required and installs on other versions are rejected.

Explicitly out of scope per the brief (not touched): pnpm workspace pin (E00-S01-T07), TypeScript exact dependency (E00-S01-T09), strict base tsconfig (E00-S01-T10). No CI workflow changes — test-suite wiring in CI is E00-S05 by design (same as T05/T06/T07); the existing CI job (frozen install + pnpm -r list on Node 24) stays green.

Criterion → test table

Acceptance criterion Test (fails without the committed config)
Node engine is restricted to 24.x in the package manifest tests/node-engine.test.mjs: "root package.json declares engines.node restricted to 24.x" — asserts the exact range >=24.0.0 <25.0.0 and that 24.0.0 / 24.1.0 / 24.20.0 / 24.99.99 satisfy it. Mutation-probed: removing engines or changing the range string fails this test
an unsupported Node version is rejected tests/node-engine.test.mjs: "the declared engines range rejects unsupported Node versions" (18.x/20.x/22.x/23.x/25.x/26.x all fail the range), "the current Node runtime satisfies the declared engines range" (fails loudly when the suite runs on an unsupported Node), and "the committed pnpm-workspace.yaml enforces engines so an unsupported Node is rejected" (engineStrict: true). End-to-end: pnpm install --frozen-lockfile under Node 22 exits 1 with ERR_PNPM_UNSUPPORTED_ENGINE (expected >=24.0.0 <25.0.0, got v22.23.2); under Node 24 it succeeds

Test plan executed

  • Clean-state install from the branch (no node_modules), Node 24: pnpm install --frozen-lockfile via corepack → success, using pnpm v11.23.0, lockfile unchanged ✓
  • pnpm -r list --depth -1 (second CI step), Node 24 → lists all four workspace packages, exit 0 ✓
  • node --test tests/**/*.test.mjs on Node 24 (v24.20.0) → 21/21 pass (10 architecture-import + 6 workspace-config + 5 node-engine), exit 0 ✓
  • Rejection proof, Node 22 (v22.23.2): pnpm install --frozen-lockfile → exit 1, ERR_PNPM_UNSUPPORTED_ENGINE ("Expected version: >=24.0.0 <25.0.0 / Got: v22.23.2"); the suite fails exactly one test ("the current Node runtime satisfies the declared engines range"), all other 20 pass ✓
  • Mutation probes: engineStrict removed from pnpm-workspace.yaml → enforcement test fails; engines.node changed to >=22.0.0 → range + rejection tests fail ✓
  • Mechanism probe: plain .npmrc engine-strict=true is ignored by pnpm 11.23.0 (install only warns), while top-level engineStrict: true in pnpm-workspace.yaml hard-fails — hence the enforcement lives in pnpm-workspace.yaml, not .npmrc

Risks / notes

  • The suite asserts the exact range string >=24.0.0 <25.0.0 and that the embedded checker understands it; a deliberate engine-line change must update manifest, workspace setting and test in the same change.
  • engineStrict is a pnpm-11 workspace setting (camelCase, top-level in pnpm-workspace.yaml); it is not part of the pnpm lockfile, so pnpm-lock.yaml is untouched.
  • Documentation + config regression suite; rollback is a revert of the three commits.

Refs #161

## What changed Restricts the workspace to the Node 24.x engine line for [E00-S01-T08] Node engine restricted to 24.x (#161), and makes both acceptance criteria **enforceable** rather than incidental: - **`package.json`** — adds `"engines": { "node": ">=24.0.0 <25.0.0" }` (exactly the 24.x line) to the root manifest. Lockfile untouched (engines is not part of the pnpm lockfile). - **`pnpm-workspace.yaml`** — adds `engineStrict: true`. pnpm 11 no longer honors `engine-strict` from `.npmrc` for non-auth settings (settings live in `pnpm-workspace.yaml`, camelCase); with `engineStrict`, an unsupported Node version is a hard install error (`ERR_PNPM_UNSUPPORTED_ENGINE`) instead of a warning. Verified against the committed pnpm 11.23.0: plain `.npmrc` `engine-strict=true` is ignored by pnpm 11, top-level `engineStrict: true` in `pnpm-workspace.yaml` is enforced. - **`tests/node-engine.test.mjs`** (new) — a `node:test` suite (zero dependencies, lockfile untouched) that fails if the restriction ever drifts, including a minimal embedded semver range checker (no `semver` dependency). - **`docs/development/non-container.md`** — prerequisite + troubleshooting rows updated: they previously described the T08 restriction as future work and claimed "Any Node ≥ 22 is enough"; Node 24.x is now required and installs on other versions are rejected. Explicitly out of scope per the brief (not touched): pnpm workspace pin (E00-S01-T07), TypeScript exact dependency (E00-S01-T09), strict base tsconfig (E00-S01-T10). No CI workflow changes — test-suite wiring in CI is E00-S05 by design (same as T05/T06/T07); the existing CI job (frozen install + `pnpm -r list` on Node 24) stays green. ## Criterion → test table | Acceptance criterion | Test (fails without the committed config) | | --- | --- | | Node engine is restricted to 24.x in the package manifest | `tests/node-engine.test.mjs`: "root package.json declares engines.node restricted to 24.x" — asserts the exact range `>=24.0.0 <25.0.0` **and** that 24.0.0 / 24.1.0 / 24.20.0 / 24.99.99 satisfy it. Mutation-probed: removing `engines` or changing the range string fails this test | | an unsupported Node version is rejected | `tests/node-engine.test.mjs`: "the declared engines range rejects unsupported Node versions" (18.x/20.x/22.x/23.x/25.x/26.x all fail the range), "the current Node runtime satisfies the declared engines range" (fails loudly when the suite runs on an unsupported Node), and "the committed pnpm-workspace.yaml enforces engines so an unsupported Node is rejected" (`engineStrict: true`). End-to-end: `pnpm install --frozen-lockfile` under Node 22 exits 1 with `ERR_PNPM_UNSUPPORTED_ENGINE` (expected `>=24.0.0 <25.0.0`, got `v22.23.2`); under Node 24 it succeeds | ## Test plan executed - Clean-state install from the branch (no `node_modules`), Node 24: `pnpm install --frozen-lockfile` via corepack → success, `using pnpm v11.23.0`, lockfile **unchanged** ✓ - `pnpm -r list --depth -1` (second CI step), Node 24 → lists all four workspace packages, exit 0 ✓ - `node --test tests/**/*.test.mjs` on **Node 24 (v24.20.0)** → **21/21 pass** (10 architecture-import + 6 workspace-config + 5 node-engine), exit 0 ✓ - **Rejection proof, Node 22 (v22.23.2)**: `pnpm install --frozen-lockfile` → exit 1, `ERR_PNPM_UNSUPPORTED_ENGINE` ("Expected version: >=24.0.0 <25.0.0 / Got: v22.23.2"); the suite fails exactly one test ("the current Node runtime satisfies the declared engines range"), all other 20 pass ✓ - Mutation probes: `engineStrict` removed from `pnpm-workspace.yaml` → enforcement test fails; `engines.node` changed to `>=22.0.0` → range + rejection tests fail ✓ - Mechanism probe: plain `.npmrc` `engine-strict=true` is **ignored** by pnpm 11.23.0 (install only warns), while top-level `engineStrict: true` in `pnpm-workspace.yaml` hard-fails — hence the enforcement lives in `pnpm-workspace.yaml`, not `.npmrc` ## Risks / notes - The suite asserts the exact range string `>=24.0.0 <25.0.0` and that the embedded checker understands it; a deliberate engine-line change must update manifest, workspace setting and test in the same change. - `engineStrict` is a pnpm-11 workspace setting (camelCase, top-level in `pnpm-workspace.yaml`); it is not part of the pnpm lockfile, so `pnpm-lock.yaml` is untouched. - Documentation + config regression suite; rollback is a revert of the three commits. Refs #161
bot-implementer added 3 commits 2026-08-28 09:15:23 +00:00
kpcto merged commit 12a3829039 into main 2026-08-28 09:18:24 +00:00
kpcto deleted branch feature/161 2026-08-28 09:18:25 +00:00
Sign in to join this conversation.