Skip to content

ci: run the engines check's npx outside the checkout - #10

Merged
sanctrl merged 1 commit into
mainfrom
fix/engines-check-npx
Nov 17, 2026
Merged

sanctrl merged 1 commit into
mainfrom
fix/engines-check-npx

Conversation

@sanctrl

@sanctrl sanctrl commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

What changes

A CI-only follow-up to #9. Nothing changes for users.

The step that checks engines.node admits each Node version runs npx -y semver@7.7.4. After pnpm install, if a semver package is already somewhere in node_modules (a transitive one, with no root bin link), it shadows the package npx would fetch, and the step fails with semver: not found. This repo has no semver in its tree today, so #9's check passes. It would break the day a dependency brings one in, which is what happened in agentchat-mcp#29. The range is now read in the checkout, and npx runs in $RUNNER_TEMP.

Verification

  • Tests: reproduced in agentchat-mcp (which has semver@7.7.4 in its tree) on Node 26.13.1. Run in the checkout, it fails with "semver: command not found" (exit 127). Run from another directory, it prints 26.13.1 for >=22.0.0 (exit 0) and exits 1 for >=22.0.0 <23. CI on this PR runs the step on Node 22, 24 and 26 on all three OSes.
  • Review: not needed: two lines in each of three CI steps.
  • Live check: n/a: CI only; the CI run on this PR is the check.

Risk and rollback

CI only. Rollback: revert this PR.

After `pnpm install`, a semver in node_modules (a transitive one, with
no root bin link) shadows the package npx would fetch, and the step
fails with "semver: not found". This repo has no semver in its tree
today, so the check passes, but the first dependency that brings one
would break it (it did in agentchat-mcp). The range is read in the
checkout and npx runs in $RUNNER_TEMP.
@sanctrl
sanctrl enabled auto-merge (squash) November 17, 2026 21:05
@sanctrl
sanctrl merged commit 52fb786 into main Nov 17, 2026
5 checks passed
@sanctrl
sanctrl deleted the fix/engines-check-npx branch November 17, 2026 21:10
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