[PR #4803] [MERGED] fix(setup): recognize shared CLI launcher aliases #6417

Closed
opened 2026-10-31 01:14:19 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4803
Author: @panditshivam
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @morluto

Base: main ← Head: fix/cli-alias-registration


📝 Commits (1)

  • 3985f74 fix(setup): recognize shared CLI launcher aliases

📊 Changes

5 files changed (+139 additions, -26 deletions)

View changed files

📝 src/application/ClientRegistrationIdentity.ts (+16 -2)
📝 src/application/ClientRegistrationStatus.ts (+6 -22)
➕ tests/acceptance/setup/launcherAliasesCli.test.ts (+64 -0)
📝 tests/boundary/cli/keyedArchivePrototypeKeyCli.test.ts (+4 -1)
📝 tests/boundary/filesystem/clientConfigurationDialects.test.ts (+49 -1)

📄 Description

Summary

Fixes #3906. A registration created through rea is now recognized by doctor and uninstall when invoked through rea-agents, and vice versa.

Problem and expected behavior

Both POSIX bin links can launch the same installed script, but their different path strings made doctor report drift and uninstall retain a setup-created entry. Switching aliases should preserve recognition and leave unrelated registrations intact.

Change and scope

Compare absolute launcher paths by their resolved script destination in the shared identity owner. Remove doctor's duplicate path comparison while retaining its transport, timeout, package-version and bare-command checks. Stored commands are preserved. Also format one existing keyed-archive test expression that blocked the full check on the base revision.

Contract and boundary impact

  • Semantic owner: ClientRegistrationIdentity; doctor consumes its identity result.
  • Scope: ordinary correction within existing setup/uninstall behavior; advance scope decision not applicable.
  • CLI/MCP contract: corrected registration status and owned-entry removal; no tool/schema change.
  • Compatibility: POSIX launcher links; Windows command-shim behavior is unchanged.
  • Evidence/provenance: stored command paths remain intact.
  • Authority/cleanup: existing approved setup/uninstall configuration writes; tests use disposable homes.
  • Generated metadata/package/install: no version or metadata change.

Expected effects:

  • Read existing files or captured data.
  • Change process memory, registers, files, or configuration.

The changed logic reads launcher path metadata. It adds no target execution, instrumentation, network access or protection recovery.

Evidence and regression coverage

Executed on macOS arm64, Node 24.18.0/npm 11.16.0. Before: setup and same-alias doctor exit 0; alternate-alias doctor exits 1 and uninstall retains the entry. Two added ownership cases fail on unchanged source, with 33 controls passing.

After: 59 focused tests pass, including both real CLI alias directions, Node-wrapped commands, different-script/dangling-link controls and unrelated-registration preservation.

Validation performed

  • npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/acceptance/setup/launcherAliasesCli.test.ts — 59 passed.
  • npm run verify:test-discovery — 1,528 files discovered once.
  • npm run check — passed, including architecture guards.
  • npm run verify:package — passed, including packaged setup/uninstall and stdio MCP checks.
  • npm pack --dry-run — passed.

Compatibility, safety, and release

No breaking change or migration. Real Windows/Linux, desktop client UI and native analysis engines were not exercised. Package checks do not establish native-provider behavior. Unresolved links remain non-owned; matching file names alone never establish identity.

Author readiness

Human owner: @panditshivam

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • [] Human owner has completed the readiness declarations.
  • [] Required checks pass for the current revision.

🔄 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/4803 **Author:** [@panditshivam](https://github.com/panditshivam) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/cli-alias-registration` --- ### 📝 Commits (1) - [`3985f74`](https://github.com/morluto/rea/commit/3985f7476ce8ca6d81b5a78ad353d6eeb5307b26) fix(setup): recognize shared CLI launcher aliases ### 📊 Changes **5 files changed** (+139 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `src/application/ClientRegistrationIdentity.ts` (+16 -2) 📝 `src/application/ClientRegistrationStatus.ts` (+6 -22) ➕ `tests/acceptance/setup/launcherAliasesCli.test.ts` (+64 -0) 📝 `tests/boundary/cli/keyedArchivePrototypeKeyCli.test.ts` (+4 -1) 📝 `tests/boundary/filesystem/clientConfigurationDialects.test.ts` (+49 -1) </details> ### 📄 Description ## Summary Fixes #3906. A registration created through `rea` is now recognized by doctor and uninstall when invoked through `rea-agents`, and vice versa. ## Problem and expected behavior Both POSIX bin links can launch the same installed script, but their different path strings made doctor report drift and uninstall retain a setup-created entry. Switching aliases should preserve recognition and leave unrelated registrations intact. ## Change and scope Compare absolute launcher paths by their resolved script destination in the shared identity owner. Remove doctor's duplicate path comparison while retaining its transport, timeout, package-version and bare-command checks. Stored commands are preserved. Also format one existing keyed-archive test expression that blocked the full check on the base revision. ## Contract and boundary impact - Semantic owner: `ClientRegistrationIdentity`; doctor consumes its identity result. - Scope: ordinary correction within existing setup/uninstall behavior; advance scope decision not applicable. - CLI/MCP contract: corrected registration status and owned-entry removal; no tool/schema change. - Compatibility: POSIX launcher links; Windows command-shim behavior is unchanged. - Evidence/provenance: stored command paths remain intact. - Authority/cleanup: existing approved setup/uninstall configuration writes; tests use disposable homes. - Generated metadata/package/install: no version or metadata change. Expected effects: - [x] Read existing files or captured data. - [x] Change process memory, registers, files, or configuration. The changed logic reads launcher path metadata. It adds no target execution, instrumentation, network access or protection recovery. ## Evidence and regression coverage Executed on macOS arm64, Node 24.18.0/npm 11.16.0. Before: setup and same-alias doctor exit 0; alternate-alias doctor exits 1 and uninstall retains the entry. Two added ownership cases fail on unchanged source, with 33 controls passing. After: 59 focused tests pass, including both real CLI alias directions, Node-wrapped commands, different-script/dangling-link controls and unrelated-registration preservation. ## Validation performed - `npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/acceptance/setup/launcherAliasesCli.test.ts` — 59 passed. - `npm run verify:test-discovery` — 1,528 files discovered once. - `npm run check` — passed, including architecture guards. - `npm run verify:package` — passed, including packaged setup/uninstall and stdio MCP checks. - `npm pack --dry-run` — passed. ## Compatibility, safety, and release No breaking change or migration. Real Windows/Linux, desktop client UI and native analysis engines were not exercised. Package checks do not establish native-provider behavior. Unresolved links remain non-owned; matching file names alone never establish identity. ## Author readiness Human owner: @panditshivam - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [] Human owner has completed the readiness declarations. - [] Required checks pass for the current revision. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:14:19 +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#6417
No description provided.