[PR #1417] [CLOSED] fix(install): print the Linux user prefix in the install plan #2870

Closed
opened 2026-10-17 21:11:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1417
Author: @Fazmin
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: fix/install-plan-linux-prefix


📝 Commits (1)

  • b4cf45b fix(install): print the Linux user prefix in the install plan

📊 Changes

2 files changed (+19 additions, -1 deletions)

View changed files

📝 install.sh (+1 -1)
📝 tests/boundary/filesystem/installScript.test.ts (+18 -0)

📄 Description

Summary

On Linux, install.sh installs with npm install --global --prefix "$HOME/.local" …, but the install plan it prints (including under --dry-run) shows npm install --global rea-agents@VERSION without the prefix. The plan now prints the command the installer actually runs. No issue is linked because this is a small, self-contained fix.

Problem and expected behavior

  • Trigger: install.sh --version 6.3.0 --dry-run on Linux.
  • Before: the plan prints Command: npm install --global rea-agents@6.3.0 next to Binary: $HOME/.local/bin/rea. The command that actually runs (install.sh line 110) passes --prefix "$HOME/.local".
  • Why it matters: installation.md says the plan shows the npm command. A Linux user who copies the printed command installs into npm's global prefix, which may need root, instead of ~/.local/bin.
  • Expected: the printed command matches the executed command on both Linux and macOS.

Change and scope

The plan line prints the same prefix_args array that the install step passes to npm. It uses "${prefix_args[*]+ ${prefix_args[*]}}", which always produces exactly one word, so the empty macOS array still lines up with the printf placeholders under Bash 3.2 with set -u. A [@] form drops the argument entirely when the array is empty; the strengthened macOS assertion catches that. Installer behavior is otherwise unchanged.

Contract and boundary impact

  • Semantic owner and earliest changed stage: install.sh plan output
  • CLI and MCP/tool-catalog contract: none
  • Provider, bridge, target-format, or platform compatibility: Linux plan text only; macOS output unchanged
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Process execution, authorization, cleanup, or containment impact: none (the executed npm command is unchanged)
  • Generated metadata, package, or installation impact: installer plan text only

Evidence and regression coverage

  • Tests added or updated: tests/boundary/filesystem/installScript.test.ts
    • New Linux user-prefix installer case: the dry-run plan contains Command: npm install --global --prefix <HOME>/.local rea-agents@0.3.0, and the real run records the identical npm arguments.
    • The macOS case now also asserts the plan line Command: npm install --global rea-agents@0.3.0.
  • Base reproduction: with the test applied to the unfixed install.sh, the new case fails (× plans the same … command that it runs).
  • User-visible output: unchanged on macOS. On Linux, under the fake-uname fixture:
      Command: npm install --global --prefix /home/user/.local rea-agents@0.3.0
      Binary:  /home/user/.local/bin/rea
    
  • Remaining proof gaps: the Linux path is verified only through the existing fake-uname fixture, not on a Linux host.

Validation performed

All commands ran on macOS (arm64) with Node 24.18.0 and npm 11.16.0:

  • npm run test:focused -- tests/boundary/filesystem/installScript.test.ts: 28 passed. The new test fails on the base revision.
  • /bin/bash install.sh --version 6.3.0 --dry-run: the macOS plan is unchanged (Bash 3.2.57).
  • npm run check: typecheck, lint, format:check, knip, metadata:check and architecture guards all passed.
  • npm run verify:test-discovery: all 702 test files discovered exactly once.

Compatibility, safety, and release

  • Breaking changes or migration steps: none
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: no change to what runs; only the printed plan changes

Review checklist

  • This PR addresses a concrete problem or an agreed enhancement.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🤖 Generated with Claude Code


🔄 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/1417 **Author:** [@Fazmin](https://github.com/Fazmin) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/install-plan-linux-prefix` --- ### 📝 Commits (1) - [`b4cf45b`](https://github.com/morluto/rea/commit/b4cf45bd9fbcf8040eb23eb85b84aa82461bdf43) fix(install): print the Linux user prefix in the install plan ### 📊 Changes **2 files changed** (+19 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `install.sh` (+1 -1) 📝 `tests/boundary/filesystem/installScript.test.ts` (+18 -0) </details> ### 📄 Description ## Summary On Linux, `install.sh` installs with `npm install --global --prefix "$HOME/.local" …`, but the install plan it prints (including under `--dry-run`) shows `npm install --global rea-agents@VERSION` without the prefix. The plan now prints the command the installer actually runs. No issue is linked because this is a small, self-contained fix. ## Problem and expected behavior - **Trigger:** `install.sh --version 6.3.0 --dry-run` on Linux. - **Before:** the plan prints `Command: npm install --global rea-agents@6.3.0` next to `Binary: $HOME/.local/bin/rea`. The command that actually runs (install.sh line 110) passes `--prefix "$HOME/.local"`. - **Why it matters:** [installation.md](https://github.com/morluto/rea/blob/main/docs/installation.md) says the plan shows the npm command. A Linux user who copies the printed command installs into npm's global prefix, which may need root, instead of `~/.local/bin`. - **Expected:** the printed command matches the executed command on both Linux and macOS. ## Change and scope The plan line prints the same `prefix_args` array that the install step passes to npm. It uses `"${prefix_args[*]+ ${prefix_args[*]}}"`, which always produces exactly one word, so the empty macOS array still lines up with the `printf` placeholders under Bash 3.2 with `set -u`. A `[@]` form drops the argument entirely when the array is empty; the strengthened macOS assertion catches that. Installer behavior is otherwise unchanged. ## Contract and boundary impact - Semantic owner and earliest changed stage: `install.sh` plan output - CLI and MCP/tool-catalog contract: none - Provider, bridge, target-format, or platform compatibility: Linux plan text only; macOS output unchanged - Evidence, artifact, provenance, or reconstruction contract: none - Process execution, authorization, cleanup, or containment impact: none (the executed npm command is unchanged) - Generated metadata, package, or installation impact: installer plan text only ## Evidence and regression coverage - **Tests added or updated:** `tests/boundary/filesystem/installScript.test.ts` - New `Linux user-prefix installer` case: the dry-run plan contains `Command: npm install --global --prefix <HOME>/.local rea-agents@0.3.0`, and the real run records the identical npm arguments. - The macOS case now also asserts the plan line `Command: npm install --global rea-agents@0.3.0`. - **Base reproduction:** with the test applied to the unfixed `install.sh`, the new case fails (`× plans the same … command that it runs`). - **User-visible output:** unchanged on macOS. On Linux, under the fake-`uname` fixture: ``` Command: npm install --global --prefix /home/user/.local rea-agents@0.3.0 Binary: /home/user/.local/bin/rea ``` - **Remaining proof gaps:** the Linux path is verified only through the existing fake-`uname` fixture, not on a Linux host. ## Validation performed All commands ran on macOS (arm64) with Node 24.18.0 and npm 11.16.0: - `npm run test:focused -- tests/boundary/filesystem/installScript.test.ts`: 28 passed. The new test fails on the base revision. - `/bin/bash install.sh --version 6.3.0 --dry-run`: the macOS plan is unchanged (Bash 3.2.57). - `npm run check`: typecheck, lint, format:check, knip, metadata:check and architecture guards all passed. - `npm run verify:test-discovery`: all 702 test files discovered exactly once. ## Compatibility, safety, and release - Breaking changes or migration steps: none - Real Hopper/Ghidra, browser, or OS coverage: not applicable - Package or release metadata impact: none - Security, privacy, process, or containment review: no change to what runs; only the printed plan changes ## Review checklist - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:11:15 +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#2870
No description provided.