Repository navigation
test(dev-environment): pin package.json engines.node into the Node-major parity chain - #1183
Merged
Merged
Conversation
…jor parity chain
The repository pins Node 22 in the devcontainer, in every workflow and in
CONTRIBUTING.md, and tests/dev-environment.test.mjs already guards the
agreement between those three. package.json declared no engines field, so the
one Node pin npm itself reads was absent: a contributor who clones outside the
devcontainer got no signal at all, and `npm ci` endorsed whatever major was
installed.
Add "engines": { "node": "22.x" } and a parity test beside the two existing
ones, reusing devcontainerNodeMajor(), so a future bump that misses the field
fails the suite instead of leaving npm silently permissive.
The field is advisory: the repository ships no .npmrc with engine-strict, so
this warns on a mismatched major without failing anyone's install.
Closes #1182
Signed-off-by: quality <quality@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
The repository pins one Node major in four places and guards three of them:
.devcontainer/devcontainer.json→"node": { "version": "22" }node-version: 22/NODE_VERSION: '22'CONTRIBUTING.mdand the developer docs → the prose prerequisitetests/dev-environment.test.mjs:364and:386already assertdevcontainer ↔ workflows and docs ↔ devcontainer parity
package.jsondeclared noenginesfield, so the one Node pin npm itselfreads was missing. Every other declaration has to be opened to be seen; a
contributor who clones outside the devcontainer and never reads CONTRIBUTING
got no signal at all, and
npm cisilently endorsed whatever major happened tobe installed.
This PR closes that link:
package.jsongains"engines": { "node": "22.x" }, matching the major thedevcontainer and every workflow already pin.
tests/dev-environment.test.mjsgainspackage.json engines.node matches the pinned Node major, placed beside the
two existing parity assertions and reusing
devcontainerNodeMajor(), so afuture Node bump that misses
package.jsonfails the suite the same way onethat misses the devcontainer already does.
The field is advisory. The repository ships no
.npmrcwithengine-strict, so a contributor on another major gets npm's warning, not afailed install. No workflow file is touched, and the pinned major is unchanged.
Verification
Run locally at
03cfcfe+ this commit, node v26.10.0 — deliberately a major CInever runs, which is the condition the new guard exists to make visible:
TZ=UTC node --test tests/dev-environment.test.mjs→ 17 pass, 0 failengines.nodeto20.xfails the newtest with
package.json engines.node (20.x) pins a different Node major than the devcontainer (22);reverted.
npm run test:unit:coverage:check→ exit 0, 2026 tests pass,src files | 100.00 | 99.92 | 8984/8984 lines | 2545/2547 regionsnpx prettier --check package.json tests/dev-environment.test.mjs→ cleanCoordination
Touches
package.jsonandtests/dev-environment.test.mjsonly. Checkedagainst every open hold-gated PR: #1161 (
scripts/audit-gate.mjs), #1163 /#1174 (
tests/tools/e2e-coverage-report.mjs,tests/e2e-coverage-run.test.mjs),#1165 (
tests/architecture-content-mirror.test.mjs), #1166 (CONTRIBUTING.md),#1168 / #1176 (
scripts/lib/svg-active-content.mjs), #1171(
tests/tools/e2e-data-fixtures.cjs,tests/e2e-data-fixtures.test.mjs,tests/e2e/fixtures/**), #1178(
tests/e2e/focus-trap-trigger-unmounted.spec.js). None of them touches eitherfile. Branch cut from a fresh
origin/main.Related Issue
Closes #1182
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88