Repository navigation
fix(scripts, install): honor test:fast "without build" promise and orient Node.js engine mismatches - #2026
Conversation
…ns without build Two helpers under scripts/lib/ reached into ../../dist/ at module load even though the top-level import was only needed by one of their exports. That turned mocked, dist-free tests into failing tests under `npm run test:fast`, which docs/testing.md § test scripts explicitly promises runs "without build": - tests/conformance/providers/hopper/realHopperSemantic.test.ts only calls requireCurrentDocument and resolveFixtureProcedure (both mock-only), but scripts/lib/real-hopper-semantic.mjs eagerly imported requireFunctionDossierOracle from dist/application/RealHopperAssertions.js. Moved the dist-dependent dossier oracle into a lazy loader called from verifyRealHopperFixture, which is where it is actually used (against the real Hopper bridge, after build:cached). - tests/evaluation/package/packagePlatformDiagnostics.test.ts only uses assertLinuxPackageProviderFailure, which depends on `json`, but scripts/lib/verify-package-core.mjs eagerly re-exported helpers from mcp-verifier-results.mjs, which in turn pulls four dist/ modules. Moved that import into verifyCompleteToolCatalog (the only consumer in this file). Downstream scripts (verify-recorded-crash.mjs, verify-package-mcp.mjs, verify-windows-package.mjs) are unaffected because they already run after build:cached. Reproduction before fix: rm -rf dist && npm run test:fast → 2 failed (both import-time errors) Reproduction after fix: rm -rf dist && npm run test:fast → 388 passed, 4924 tests, 0 failed npm run build:cached && npm run test:fast → 388 passed, 4924 tests, 0 failed Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1be1b42f6a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
1be1b42 to
c2ce9ae
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2ce9ae14a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
c2ce9ae to
b0b6ab7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0b6ab743d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…e remediation install.sh previously told operators "use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+" without saying how to install one. The curl|bash onboarding path then left the operator to guess between nvm, fnm, n, Volta, system packages, or nodejs.org — a lookup that bounces across search engines for a first-time user. Replace the one-line failure with a block that: - Names the detected Node.js version (so the operator confirms it is theirs). - Shows the three most common install paths (nvm, fnm, direct tarball). - Pins the Node.js release line (24) that satisfies the engine, so copy-paste commands produce a supported runtime instead of whichever "latest" is on top. - Maps uname -m / uname -s to the Node.js tarball label pair for this host (e.g. darwin/arm64, linux/x64), so the operator can grab the right archive from https://nodejs.org/dist/latest-v24.x/ without a second lookup. Verified with four Node.js versions (24.18 compatible, 25.9/20.11 outside the supported ranges, 22.18 below the minor floor) that remediation triggers only on real mismatches and names the host labels correctly. shellcheck install.sh and npm run check:fast remain clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
b0b6ab7 to
716cc96
Compare
|
TL;DR: Both fixes work on Linux. With no build, ResultsBase is edf4624 (#2004), the commit this PR branched from. Head is 716cc96. GitHub lists a1b5d51 (#1363) as base, which is one commit later and adds the Go feature. I used the branch point so only this PR's five files differ.
On base, both failures match the PR text. On head, 4,928 tests pass and 3 skip. The PR body says 4,924. I do not know why the counts differ. On my base the two failing files run 0 tests. On head they add 11. Node version messageI used a fake
The 24.5.0 case runs the branch the audit file marks "verified by shell branch inspection" only. Host labels with a fake unameDarwin on arm64 prints Codex reviewed this PR three times. All three findings are in the final head: the test fixture, the audit rows, and the old-copy and new-copy columns. Not run
Thanks, astralyx0129, for the fix. Thanks also for answering each Codex finding with a small amended commit. Test setup
Commands# trees from the read-only mirror, no .git inside
git -C ~/code/rea-mirror/rea.git archive 716cc96ad | tar -x -C $J/head
git -C ~/code/rea-mirror/rea.git archive edf46248f | tar -x -C $J/base
# step 1 (Node 24 first on PATH; for Node 22 use /usr/bin/node's npm)
HUSKY=0 npm ci
rm -rf dist
npm run test:fast
npm run build && npm run test:fast # head only
# step 2 (job-dir HOME, fake node first on PATH)
env -i HOME=$J/home PATH=$J/shims/20.0.0:/usr/bin:/bin \
bash install.sh --version 0.3.0 --dry-run --no-setup </dev/null
# step 3
npx vitest run --project boundary tests/boundary/filesystem/installScript.test.ts
npm run typecheck
npm run docs:check # head only, Node 24: exit 0The fake 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Congratulations on your first PR. Thank you for this. Looks good to merge. |
1 similar comment
|
Congratulations on your first PR. Thank you for this. Looks good to merge. |
Summary
Two independent fixes that align observed behavior with promises already made in the repo.
1.
fix(scripts):test:fastruns without build (as docs promises)docs/testing.md § test scripts tells readers
npm run test:fastruns "without build". Reproduction before this change —rm -rf dist && npm run test:fast— fails two test files at import time:tests/conformance/providers/hopper/realHopperSemantic.test.ts: only callsrequireCurrentDocumentandresolveFixtureProcedurewith mock clients, butscripts/lib/real-hopper-semantic.mjseager-importsrequireFunctionDossierOraclefromdist/application/RealHopperAssertions.jsat the top of the module.tests/evaluation/package/packagePlatformDiagnostics.test.ts: only usesassertLinuxPackageProviderFailure(which needs justjson), but reachesscripts/lib/verify-package-core.mjs→scripts/lib/mcp-verifier-results.mjs→ fourdist/modules through a top-level re-export.Both top-level imports move into lazy loaders called from the one function that actually needs
dist/(verifyRealHopperFixture/verifyCompleteToolCatalog). Scripts that run afterbuild:cached(verify-recorded-crash.mjs,verify-package-mcp.mjs,verify-windows-package.mjs) are unaffected because the lazy load still resolves oncedist/exists.2.
fix(install): actionable remediation on Node.js version mismatchinstall.shpreviously told operators to "use Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+" without saying how. For a first-time `curl | bash` user that is a Google search between nvm, fnm, n, Volta, system packages, and nodejs.org.The new failure block:
nvm/fnm/ direct-tarball install paths.24) that satisfies the engine, so copy-paste commands produce a supported runtime instead of whichever latest is on top.uname -m/uname -sto the Node.js tarball label pair for this host (darwin/arm64,linux/x64, …), so the operator can grab the right archive fromhttps://nodejs.org/dist/latest-v24.x/without a second lookup.Validation
rm -rf dist && npm run test:fast→ 388 passed, 4924 tests, 0 failed (before the first fix: 2 import-time failures).npm run build:cached && npm run test:fast→ 388 passed, 4924 tests, 0 failed (no regression withdist/present).shellcheck install.sh→ clean.npm run check:fast→ typecheck + lint clean.nodeinPATH: remediation triggers only on real mismatches and names the host labels correctly ondarwin/arm64.Test plan
rm -rf dist && npm run test:fastpasses clean.npm run build:cached && npm run test:fastpasses clean.shellcheck install.shclean.npm run check:fastclean.🤖 Generated with Claude Code