Skip to content

Pin the Node/npm toolchain so CI, the image and local checkouts cannot silently diverge #343

Closed

Description

@devantler

🤖 Generated by the Agentic Engineer

Evidence

#340 was caused by a Node/npm major skew: CI ran Node 22 (npm 10) while the Dockerfile ships node:26-alpine (npm 11). The two npm majors resolve the same manifest into different nested trees, so every lockfile Dependabot wrote (as npm 11) was rejected by CI's npm 10 at npm ci.

Measured on main's own manifest: npm@10.9.8 --package-lock-only reproduced the committed lock byte-identically with 26 nested puppeteer-core entries, while npm@11.19.1 produced 15. Same inputs, two different correct answers — the skew alone was the defect.

#341 aligns CI to Node 26. Nothing holds it aligned. At main there is no packageManager field, no .nvmrc, no .node-version and no .npmrc; engines.node was an open >=22. The alignment is two numbers that currently happen to match, edited in separate files. The next image bump re-opens the same gap, and the failure mode is silent until dependency updates stop merging.

Impact

Contributors, CI and the shipped image can each resolve a different dependency tree from the same manifest. The symptom is remote from the cause — "Dependabot is broken" rather than "two npm majors disagree" — which is why it took a two-arm lockfile control to name it.

Expected behaviour

One declared toolchain that CI, the image and a local checkout all read, so divergence is a merge conflict rather than a silent skew.

Acceptance criteria

  • package.json declares packageManager pinning the npm version.
  • A single source declares the Node version (.nvmrc or .node-version), and CI consumes it via node-version-file: rather than a literal.
  • The Dockerfile's base image and that declared version agree, with the link made explicit enough that changing one without the other is visible in review.
  • engines.node matches the supported runtime rather than an open lower bound.

Rough size: small — a pin, a version file, and a CI reference.

Part of #91.

Activity

  1. added theissue type on Sep 20, 2026
  2. moved this to 📥 Backlog in 🌊 Project Boardon Sep 20, 2026
  3. added a commit that references this issue on Oct 10, 2026
  4. moved this from 🧊 Icebox to 👀 In Review in 🌊 Project Boardon Oct 10, 2026
  5. added a commit that references this issue on Oct 10, 2026
    039ec00
  6. moved this from 👀 In Review to ✅ Done in 🌊 Project Boardon Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions