Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[quality] CI's Node version follows the open engines range >=24, not the node24 runtime action.yml declares

オープン
#602 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@hivecommons-hive がすでに取り組んでいます。

2026年10月28日 から。

  • #603 @hivecommons-hive による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
github-actions, node.js, typescript
領域
ci-cd, devtools

調査の方向性

Start with package.json, tests/runtime.test.ts, and docs/contributing.md; read how setup-node resolves node-version-file and how the existing test checks engines.node. Update the runtime declaration, its assertions, and the contributor guidance as described, then run the runtime tests and confirm npm ci on a newer Node version warns and continues. Issue #603 is already an open linked pull request.

索引モデルが issue の本文から書いたものです。

説明

agent/quality needs-kind stage/040-covered-by-pr testing

Finding

Every `actions/setup-node` step in `test.yml`, `release.yml` and `pre-release.yml` reads `node-version-file: package.json`, and `package.json` carries only `"engines": { "node": ">=24" }`. `tests/runtime.test.ts` locks both facts in (`engines.node` must equal `>=24`; no step may set `node-version` by hand).

That open range does not pin the runtime. setup-node (v7.1.0, the SHA the workflows pin) resolves a range with `@actions/tool-cache` `find()`, which sorts the runner's cached Node versions and returns the highest one satisfying the range (`tool-cache.ts` `evaluateVersions`, scanned from the top). Only if nothing cached matches does it download, and then it picks the newest matching release from nodejs.org.

Today that resolves to 24.21.0 — the latest `build-test` run on `main` (run 40644250194 @ 9acb046) logs `Resolved package.json as >=24` then `Found in cache @ /opt/hostedtoolcache/node/24.21.0/x64` — but only because the `ubuntu-24.04` and `ubuntu-26.04` images (20261023 builds) cache exactly 22.23.3 and 24.21.0. The day runner-images adds the Node 26 LTS line to the tool cache, with no change to this repository:

  • the unit and e2e suites in `test.yml` run under Node 26 while `action.yml` still declares `runs.using: node24`;
  • `release.yml` / `pre-release.yml` build the shipped `dist/index.js` with `ncc` under Node 26;
  • `tests/runtime.test.ts` keeps passing, because it checks the text of `engines.node`, not the major a setup-node step can land on.

`.github/dependabot.yml` already states the intent ("@types/node tracks the runtime in action.yml (runs.using: node24); bump both together"); the CI Node version is the one piece that does not.

Recommendation

setup-node reads `devEngines.runtime` from `package.json` before `engines.node` (`src/util.ts` in the pinned v7.1.0). Add, next to `engines`:

"devEngines": {
  "runtime": { "name": "node", "version": "24", "onFail": "warn" }
}
  • `"24"` resolves to the newest cached 24.x, so patch releases still flow; a newer major never does.
  • `onFail: warn` keeps `docs/contributing.md`'s "Node 24 or newer is required" true for contributors: `npm ci` on Node 26 prints `EBADDEVENGINES` and continues (verified with npm 11.20.0 on Node 26.12.0; exit 0, lockfile unchanged).
  • Extend `tests/runtime.test.ts` so it asserts `devEngines.runtime` names `node`, pins the bare major `action.yml` declares, and uses `onFail: warn`; a range such as `>=24` in that field fails the new case.
  • One sentence in `docs/contributing.md` saying why the major is named there.

No workflow file changes: the steps keep `node-version-file: package.json` and the existing test that forbids a hand-pinned `node-version` still holds.

Decision taken by hive: `devEngines.runtime` rather than `volta.node` (npm 11 standard field, also honoured by `npm ci`) and `onFail: warn` rather than the default `error` (contributing.md permits newer Node locally).

Priority

  • Impact: medium — latent today, silent when it fires: tests and the release bundle move to a runtime the action never executes under
  • Effort: low

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9acb046

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

主要言語
TypeScript
スター
132
フォーク
24
平均マージ
1日 16時間
マージ済み PR(30日)
209

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cncf/prow-github-actions のほかの issue

cncf/prow-github-actions の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。