test: cover the developer-environment contract (tests/dev-environment.test.mjs) - #350
Merged
Merged
Conversation
Adds tests/dev-environment.test.mjs, asserting that the Justfile, .devcontainer/devcontainer.json and the setup commands documented in README.md, CONTRIBUTING.md and AGENTS.md resolve against package.json and agree with the Node major the workflows pin. Closes #349 Signed-off-by: kubestellar-hive[bot] <kubestellar-hive@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 automatically remove the |
This was referenced Sep 20, 2026
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
Adds one new test-only file,
tests/dev-environment.test.mjs(8 tests). It isthe first test in this repository to read the
Justfile,.devcontainer/devcontainer.json, or the commands inside a fenced block in thedeveloper docs.
Files claimed by this PR:
tests/dev-environment.test.mjs(new). Nothingelse — no production code, no workflow, no
package.json, no lockfile, no newdependency. It uses
node:test,node:assert/strict,node:fs,node:pathand the
yamldevDependency the repo already declares.The gap
README.md:40andCONTRIBUTING.md:15document the devcontainer as asupported way to run this site, and
CONTRIBUTING.md:8states the Nodeprerequisite. Those claims point at
.devcontainer/devcontainer.json, whichpins its own Node major, forwarded port and
postCreateCommand— checkedagainst nothing. The
Justfilehas 7npm runtargets with no gate, and thethree developer docs another 15.
Rename a
package.jsonscript andjust build, the README quickstart and theCONTRIBUTING setup block all become instructions that fail on first
copy-paste, while every CI check stays green. Bump
NODE_VERSIONin theworkflows and the devcontainer silently keeps building on the old major.
What the 8 assertions cover
Justfileparses into recipes and none has an empty body.npm run <name>in aJustfilerecipe is a definedpackage.jsonscript.devcontainer.jsonparses (as JSON-with-comments) and pins animageand acontainerUser.npm run <name>in a devcontainer lifecycle command is a defined script.forwardPortscontains the portjust serveactually opens.npm run <name>inREADME.md,CONTRIBUTING.md,AGENTS.mdis a defined script.NODE_VERSIONand literalnode-version).Verification
node --test tests/dev-environment.test.mjs— 8/8 pass at00b44df.npm run test:unit: 61/61 (55 before, +6 at the time of the firstrun, +8 now).
confirmed to fail on injected drift: a bad
npm runtarget in theJustfile,in
postCreateCommand, and inREADME.md;forwardPorts: [4000]; thedevcontainer node feature at
20; a deletedcontainerUser; an emptyserverecipe; andNode.js 20+inCONTRIBUTING.md. Working tree restoredafter every mutation (
git statusclean).npx prettier --checkclean.Disjointness
tests/workflow-scripts.test.mjs) scopes itself topackage.json<->
scripts/<-> linter dotfiles <->npm runsteps in.github/workflows. Its diff contains noJustfile,.devcontainer,README.md,CONTRIBUTING.mdorAGENTS.mdmatch, and no Node-versionassertion.
permissions:; this reads workflowsonly for
node-version/NODE_VERSION.*.md; this reads theshell commands inside fenced blocks.
Justfileor.devcontainer/.Related Issue
Closes #349
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5