[PR #440] [MERGED] fix(setup): refresh stale local npx bootstrap #1988

Closed
opened 2026-10-16 21:13:07 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/440
Author: @morluto
Created: 7/26/2026
Status: ✅ Merged
Merged: 7/26/2026
Merged by: @morluto

Base: main ← Head: fix/npx-setup-shadowing


📝 Commits (1)

  • 90bb161 fix(setup): refresh stale local npx bootstrap

📊 Changes

9 files changed (+303 additions, -1 deletions)

View changed files

📝 README.md (+7 -0)
📝 docs/installation.md (+18 -0)
📝 package.json (+1 -0)
➕ scripts/package-runner-bootstrap.d.mts (+19 -0)
➕ scripts/package-runner-bootstrap.mjs (+72 -0)
📝 scripts/rea.mjs (+11 -1)
📝 tests/dispatcher.test.ts (+8 -0)
➕ tests/packageRunnerBootstrap.test.ts (+153 -0)
📝 tests/readmeConsistency.test.ts (+14 -0)

📄 Description

Description

Bare npx rea-agents setup can resolve a project-local REA dependency before npm consults the registry. When the selected release contains this change, the executable dispatcher now detects that local package-runner resolution and restarts setup through rea-agents@latest before loading the setup runtime or planning any writes.

The bootstrap forwards the original setup arguments, marks the child invocation to prevent recursion, and leaves global, direct, npm-cache, and non-setup commands unchanged. An exact npm exec --package=rea-agents@<version> request remains available for intentional rollback; setup continues to persist exact-version MCP registrations, and the existing reviewed setup transaction migrates older managed registrations.

An already-published old package cannot gain this dispatcher check retroactively. The installation guide therefore gives npx -y rea-agents@latest setup as the one-time recovery path for registrations created by such a release.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passes (npm test)
  • Real Hopper verification performed (npm run verify:hopper)
  • Linux real Hopper verification performed (npm run verify:hopper:linux) or unavailability explained
  • Real browser verification performed (npm run verify:browser) or unavailability explained
  • Package verification performed (npm run verify:package)

Commands run:

  • npx vitest run tests/packageRunnerBootstrap.test.ts tests/dispatcher.test.ts tests/readmeConsistency.test.ts tests/setupConfig.test.ts tests/clientRegistrationStatus.test.ts tests/doctor.test.ts --coverage.enabled=false
  • npm run verify:package
  • npm run check:pr

Real Hopper, Ghidra, and browser verification were not run because this change is limited to npm package-runner bootstrap and setup documentation; provider behavior is unchanged.

Tool Contract Impact

None. MCP tool schemas and the canonical tool inventory are unchanged.

Closes #439


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/440 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/26/2026 **Status:** ✅ Merged **Merged:** 7/26/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/npx-setup-shadowing` --- ### 📝 Commits (1) - [`90bb161`](https://github.com/morluto/rea/commit/90bb1610f56448846adf85b31d9ae96be12dfb4a) fix(setup): refresh stale local npx bootstrap ### 📊 Changes **9 files changed** (+303 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+7 -0) 📝 `docs/installation.md` (+18 -0) 📝 `package.json` (+1 -0) ➕ `scripts/package-runner-bootstrap.d.mts` (+19 -0) ➕ `scripts/package-runner-bootstrap.mjs` (+72 -0) 📝 `scripts/rea.mjs` (+11 -1) 📝 `tests/dispatcher.test.ts` (+8 -0) ➕ `tests/packageRunnerBootstrap.test.ts` (+153 -0) 📝 `tests/readmeConsistency.test.ts` (+14 -0) </details> ### 📄 Description ## Description Bare `npx rea-agents setup` can resolve a project-local REA dependency before npm consults the registry. When the selected release contains this change, the executable dispatcher now detects that local package-runner resolution and restarts setup through `rea-agents@latest` before loading the setup runtime or planning any writes. The bootstrap forwards the original setup arguments, marks the child invocation to prevent recursion, and leaves global, direct, npm-cache, and non-setup commands unchanged. An exact `npm exec --package=rea-agents@<version>` request remains available for intentional rollback; setup continues to persist exact-version MCP registrations, and the existing reviewed setup transaction migrates older managed registrations. An already-published old package cannot gain this dispatcher check retroactively. The installation guide therefore gives `npx -y rea-agents@latest setup` as the one-time recovery path for registrations created by such a release. ## Type of Change - [x] Bug fix - [ ] New feature - [x] Documentation update - [ ] Performance improvement - [ ] Refactoring (no functional change) - [ ] Tool contract change (MCP schema modification) ## Testing Performed - [x] Unit tests added or updated - [x] TypeScript typecheck passes (`npm run typecheck`) - [x] Linting passes (`npm run lint`) - [x] Full test suite passes (`npm test`) - [ ] Real Hopper verification performed (`npm run verify:hopper`) - [ ] Linux real Hopper verification performed (`npm run verify:hopper:linux`) or unavailability explained - [ ] Real browser verification performed (`npm run verify:browser`) or unavailability explained - [x] Package verification performed (`npm run verify:package`) Commands run: - `npx vitest run tests/packageRunnerBootstrap.test.ts tests/dispatcher.test.ts tests/readmeConsistency.test.ts tests/setupConfig.test.ts tests/clientRegistrationStatus.test.ts tests/doctor.test.ts --coverage.enabled=false` - `npm run verify:package` - `npm run check:pr` Real Hopper, Ghidra, and browser verification were not run because this change is limited to npm package-runner bootstrap and setup documentation; provider behavior is unchanged. ## Tool Contract Impact None. MCP tool schemas and the canonical tool inventory are unchanged. ## Related Issues Closes #439 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:07 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1988
No description provided.