[PR #652] [MERGED] fix(cli): include build step in missing-runtime recovery #2140

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/652
Author: @kaoru0822-kitauji
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: fix/dispatcher-build-recovery


📝 Commits (1)

  • ae72abd fix(cli): include build step in missing-runtime recovery

📊 Changes

2 files changed (+5 additions, -2 deletions)

View changed files

📝 scripts/rea.mjs (+1 -1)
📝 tests/boundary/cli/dispatcher.test.ts (+4 -1)

📄 Description

Summary

Correct the executable dispatcher's missing-runtime recovery command to npm ci && npm run build:cached.

No separate issue: this is a small, reproduced recovery-message defect.

Problem and expected behavior

When the compiled runtime is absent, scripts/rea.mjs currently says that npm ci installs dependencies and builds REA. The current prepare script only installs Husky hooks, and CONTRIBUTING explicitly documents that npm ci does not build. Following the message leaves the runtime missing.

The recovery instruction should name the supported build command so a source checkout can actually recover.

Change and scope

  • Add npm run build:cached after the dependency installation command.
  • Assert the corrected instruction for bare MCP, MCP doctor, and CLI entry modes.
  • Retain the separate reinstall guidance for an installed npm package.

Contract and boundary impact

  • Semantic owner: executable preflight before importing the compiled runtime.
  • CLI/MCP: diagnostic text changes; exit code 1 and dispatch behavior are preserved.
  • Provider/platform and evidence/artifact contracts: no changes.
  • Process/authorization/cleanup: no automatic build or new effects; this only corrects recovery advice.
  • Generated metadata/package: no dependency, schema, version, or build-lifecycle changes.

Evidence and regression coverage

On base 19f8cdd, the new recovery expectation fails against the actual emitted stderr, while the routing control passes. With the correction, both dispatcher tests pass, covering three missing-runtime entry modes and normal CLI/MCP routing.

The supported build command exists in package.json and ran successfully as the boundary-test prerequisite.

Validation performed

  • npm run test:focused -- tests/boundary/cli/dispatcher.test.ts: 2 passed.
  • npm run check: passed (93 lint warnings, 0 errors).
  • npm run verify:package: passed with a writable temporary npm cache, including packaged CLI, four-client setup/readback/idempotence, and 116-tool MCP verification.
  • npm pack --dry-run: passed.
  • git diff --check: passed.
  • Independent review found no blocking issue.

Runtime: Node.js 24.19.0, npm 11.9.0. Full hosted CI is tracked separately; no full local suite pass is claimed.

Compatibility, safety, and release

No migration or provider behavior change. Real Hopper/Ghidra, macOS, and Windows verification were not run locally; package verification establishes its integration coverage only.

Prepared with AI assistance.


🔄 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/652 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/6/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `fix/dispatcher-build-recovery` --- ### 📝 Commits (1) - [`ae72abd`](https://github.com/morluto/rea/commit/ae72abd019b25347bfc7593b5dcadc5a2cbc3786) fix(cli): include build step in missing-runtime recovery ### 📊 Changes **2 files changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `scripts/rea.mjs` (+1 -1) 📝 `tests/boundary/cli/dispatcher.test.ts` (+4 -1) </details> ### 📄 Description ## Summary Correct the executable dispatcher's missing-runtime recovery command to `npm ci && npm run build:cached`. No separate issue: this is a small, reproduced recovery-message defect. ## Problem and expected behavior When the compiled runtime is absent, `scripts/rea.mjs` currently says that `npm ci` installs dependencies and builds REA. The current prepare script only installs Husky hooks, and CONTRIBUTING explicitly documents that `npm ci` does not build. Following the message leaves the runtime missing. The recovery instruction should name the supported build command so a source checkout can actually recover. ## Change and scope - Add `npm run build:cached` after the dependency installation command. - Assert the corrected instruction for bare MCP, MCP doctor, and CLI entry modes. - Retain the separate reinstall guidance for an installed npm package. ## Contract and boundary impact - Semantic owner: executable preflight before importing the compiled runtime. - CLI/MCP: diagnostic text changes; exit code 1 and dispatch behavior are preserved. - Provider/platform and evidence/artifact contracts: no changes. - Process/authorization/cleanup: no automatic build or new effects; this only corrects recovery advice. - Generated metadata/package: no dependency, schema, version, or build-lifecycle changes. ## Evidence and regression coverage On base `19f8cdd`, the new recovery expectation fails against the actual emitted stderr, while the routing control passes. With the correction, both dispatcher tests pass, covering three missing-runtime entry modes and normal CLI/MCP routing. The supported build command exists in package.json and ran successfully as the boundary-test prerequisite. ## Validation performed - `npm run test:focused -- tests/boundary/cli/dispatcher.test.ts`: 2 passed. - `npm run check`: passed (93 lint warnings, 0 errors). - `npm run verify:package`: passed with a writable temporary npm cache, including packaged CLI, four-client setup/readback/idempotence, and 116-tool MCP verification. - `npm pack --dry-run`: passed. - `git diff --check`: passed. - Independent review found no blocking issue. Runtime: Node.js 24.19.0, npm 11.9.0. Full hosted CI is tracked separately; no full local suite pass is claimed. ## Compatibility, safety, and release No migration or provider behavior change. Real Hopper/Ghidra, macOS, and Windows verification were not run locally; package verification establishes its integration coverage only. Prepared with AI assistance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:48 +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#2140
No description provided.