Repository navigation
feat(cli): migrate existing MCP registrations to npx on update - #100
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ 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: 9fd5517e5a
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d26d6d712d
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: 09358cb286
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
Issue
Closes #99
Problem and result
A Node upgrade can remove the Node binary and globally installed Rebut script used in an existing MCP registration. A successful
rebut updatenow migrates supported Codex and Claude Code registrations torebut-mcp@latestvia npx, including when the installed CLI is already current. Both registration writers preserve existing host settings.Codex uses a dedicated npm working directory. Claude Code uses npx's explicit
--prefixand retains its working directory. Both modes disable npm install scripts. Registrations remain intact if the package update fails or their visible PATH lacks npx or selects a different Node installation. The updater also accepts npm 12's one-element latest-version response and avoids migrating to a tag older than the installed CLI.Older versions use the first
rebut updateto install the migration-capable CLI. Run the same command again to migrate. Installation guides cover restart behavior, PATH and rollback in all four languages.Validation
npm run typecheck,npm run build,npm test(307 passed),npm run test:packagerebut updatemigrated both existing entries on all four devices. Repeat execution preserved both files byte for byte.Device validation
A direct stdio probe listed all three tools on all four devices. Host tests used isolated npm caches and settings; no production Worker or provider was called.
Windows runtime validation
The updater also checks the Node executable next to npm's
npx.cmd. When that runtime differs from the verified Node, or another Windows launcher makes lookup ambiguous, it keeps the existing registration.On a physical Windows host, the previous check accepted a mixed PATH. The corrected check rejected it and passed the normal adjacent-Node and PATH-fallback cases. The Windows smoke job now covers those cases, an invalid sibling, and competing Node and npx launchers.