[quality] CI's Node version follows the open engines range >=24, not the node24 runtime action.yml declares
维护者通常 2 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 28/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- github-actions, node.js, typescript
调研方向
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 内容生成。
描述
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 小时
- 30 天内合并 PR
- 209
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cncf/prow-github-actions 的其他 Issue
-
[quality] Unit suite's call-through @actions/core emits workflow commands: green build-test runs carry 10 failure + 10 warning fixture annotations可能已有人在做 @hivecommons-hive 于 1 天前认领。 未关闭agent/quality needs-kind stage/040-covered-by-pr testing
难度 2/5 1-3 小时 新手友好度 72/100
cncf/prow-github-actions#604 · 1 条评论 ·
维护者通常 2 天内回复
-
[quality] src/server (GitHub App server) is never executed: entry point at 0 % lines, default background arm unpinned, dist-server bundle never built-and-run by any test可能已有人在做 @hivecommons-hive 于 1 天前认领。 未关闭agent/quality needs-kind stage/040-covered-by-pr testing
难度 3/5 1-2 天 新手友好度 55/100
cncf/prow-github-actions#610 · 1 条评论 ·
维护者通常 2 天内回复
-
[quality] Nothing verifies the unit test each v8-ignore hint in src/ says drives its arm; add a static guard over the 25 hints可能已有人在做 @hivecommons-hive 于 2 天前认领。 未关闭agent/quality needs-kind stage/040-covered-by-pr testing
难度 3/5 1-2 天 新手友好度 35/100
cncf/prow-github-actions#600 · 2 条评论 ·
维护者通常 2 天内回复
-
agent/quality needs-kind stage/045-needs-decision testing
难度 4/5 3-5 天 新手友好度 30/100
cncf/prow-github-actions#594 · 3 条评论 ·
维护者通常 2 天内回复
-
[quality] Pin the ten behavioural Stryker survivors in sweep's delayed-reviewer guards, meow's image validation, the tilde-fence opener and /approve cancel可能已有人在做 @hivecommons-hive 于 3 天前认领。 未关闭agent/quality needs-kind stage/040-covered-by-pr testing
难度 3/5 1-2 天 新手友好度 25/100
cncf/prow-github-actions#592 · 2 条评论 ·
维护者通常 2 天内回复
查看 cncf/prow-github-actions 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:web p3
难度 2/5 1-3 小时 新手友好度 72/100
Lets-Parley/Parley#912 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
wealthfolio/wealthfolio#2376 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
be-BOP-io-SA/be-BOP#2817 ·
维护者通常 5 天内回复
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 84/100
sno-ai/sno-station#149 · 1 条评论 ·
维护者通常 1 天内回复