Skip to content

Report one version and one Node floor, asserted against the tag - #42

Merged
repsecure merged 4 commits into
mainfrom
agent/8.x-install-node-floor
Aug 7, 2026
Merged

Report one version and one Node floor, asserted against the tag#42
repsecure merged 4 commits into
mainfrom
agent/8.x-install-node-floor

Conversation

@repsecure

@repsecure repsecure commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Report one version and one Node floor, and assert them against the tag.

Opened on behalf of a subagent that could not reach the API from this host (gh is not installed and the credential sits in a locked keyring). It pushed over SSH; only the HTTPS API needed a token.

Why this is not a docs sweep

docs/install.md said Node.js 20+ while engines says >=22.12.0, so an install on Node 20 failed with an engine error the install doc promised would not happen. Raising that line exposed two more instances of the same class of bug that a markdown sweep does not reach.

Three string literals had sat at 0.1.0 for months: GET /health, the telemetry scope, and a doctor check. The doctor check was also comparing only the major version, via Number(...split(".")[0]), which is the wrong number compared the wrong way. All three now derive from dist/version.js.

Why it cannot regress

The build job already asks the Go binary what version it reports; the Node surfaces had no equivalent check, which is precisely how three literals drifted unnoticed. The release workflow now asserts every version surface against the tag rather than trusting that someone fixed them.

The Go side was already better covered than the Node side, by three things that predate this branch: verifier/report.go holds the version as a literal, verifier/main_test.go fails if that literal disagrees with package.json, and release.yml stamps it from the tag via ldflags and then asserts the built binary prints it. That unit test is exactly what the Node side lacked, and tests/version.test.ts is now its analogue.

Verification

Blast-radius run rather than the full suite: cli, telemetry-otel, route-auth, version, manifest-inspection, route-error-shape, dashboard, 7 suites and 69 tests passing. tsc --noEmit clean. check-workflow-pins.js clean.

One interaction risk was checked rather than assumed: src/version.ts reads package.json at module load, so any suite mocking fs that transitively imports health, otel, or cli would break. No suite mocks fs, so it is not realized. Worth knowing before someone adds one.

Provenance

This originated on the stranded branch agent/4.2a-install-node-floor, which had no PR and predates the MCP plane, enforcement modes, the perimeter, the repsecure rename, and the kill-switch/scan renames. All three defects were confirmed still live on current main before rebasing, rather than assumed. A comment referencing the retired @reesebuilt scope was corrected to @repsecure in passing.

Correction to an earlier draft of this description

An earlier version of this body claimed README.md:47 deliberately kept "Node 20+" to describe when fetch became available. That was true when the original commit message was written and is not true now: the README was rebuilt from 651 lines to 354 in #40, which removed the line. The file currently contains no occurrence of "Node 20" or "fetch", and its only Node statements are "Node.js 22.12 or newer" and "Node.js 22.12+", both already correct. The claim was relayed from a commit message without being rechecked against the tree.

agentwall-agent and others added 4 commits August 6, 2026 09:52
package.json declares engines >=22.12.0, so an install on Node 20 fails with
an engine error while this line promised it would work. The README badge and
quickstart already moved; this was the last place the old floor was stated as
a support claim.

README.md:47 keeps saying Node 20+ on purpose. It describes when fetch began
bypassing https_proxy, which raising the floor does not make false.
docs/install.md still said Node.js 20+ while engines says >=22.12.0, so an
install on Node 20 failed with an engine error the install doc promised would
not happen. Raising that line exposed two more copies of the same class of bug
that a markdown sweep does not reach.

agentwall doctor compared only the major version, `Number(...split(".")[0])
>= 20`, so it printed a green check on Node 20.x and on 22.0.0. npm refuses to
install on both. A tool that tells an operator their runtime is fine, after the
install has already disagreed, is worse than one that says nothing.

GET /health and the telemetry scope each carried the literal "0.1.0". Both
would have reported a version that was never released for the whole of 0.2.0,
and /health is the first thing anyone curls at a running instance.

src/version.ts now reads package.json once and exports the version and the
engines floor, so a release bump reaches every surface at once instead of
needing four edits nobody remembers to make. cli.ts loses its private
getPackageVersion in favour of it: one reader, not two. The lookup walks up
from the module rather than assuming a depth, because the same code runs from
dist/, from dist/routes/, from src/ under ts-node, and from inside
node_modules once published.

Tests cover the floor comparison at the boundary that was broken (major equal,
minor below) and pin /health to the manifest version. Both fail if the old
behaviour is restored.

README.md:47 keeps saying Node 20+ on purpose: it describes when fetch began
bypassing https_proxy, which raising the floor does not make false.

Test Suites: 35 passed, 35 total
Tests:       311 passed, 311 total
…x them

The build job already asks the Go binary what version it reports. The Node
surfaces had no such check, which is how three string literals sat at 0.1.0
for months: GET /health, the telemetry scope, and a doctor check comparing the
wrong number the wrong way.

All of them derive from dist/version.js now, so asserting that module and the
CLI covers every one. A release stops rather than publishing a build whose
reported version is not the tag.

This is the difference between fixing four surfaces and making it impossible
for them to silently diverge again. Falsified both directions: passes at the
real version, fails naming each disagreeing surface when handed a tag the tree
does not carry.
@repsecure
repsecure merged commit cd822b1 into main Aug 7, 2026
9 of 10 checks passed
@repsecure
repsecure deleted the agent/8.x-install-node-floor branch August 7, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant