[PR #4899] [CLOSED] fix(setup): preserve unresolved launcher identity #6668

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4899
Author: @behalnihal
Created: 10/17/2026
Status: ❌ Closed

Base: main ← Head: fix/4895-unresolved-launcher-identity


📝 Commits (1)

  • 76f61f0 fix(setup): preserve unresolved launcher identity

📊 Changes

4 files changed (+146 additions, -71 deletions)

View changed files

📝 src/application/ClientRegistrationIdentity.ts (+27 -58)
📝 tests/acceptance/setup/launcherAliasesCli.test.ts (+53 -0)
📝 tests/boundary/filesystem/clientConfigurationDialects.test.ts (+22 -9)
📝 tests/boundary/filesystem/clientRegistrationStatus.test.ts (+44 -4)

📄 Description

Summary

Fixes #4895. Preserve unresolved launcher aliases as unknown instead of classifying them as foreign registrations. Doctor retains the configured command and shows identity-verification guidance; maintenance and uninstall continue to require positive ownership.

Problem and expected behavior

A dangling symlink such as broken -> removed.mjs previously returned foreign, just like a confirmed different dispatcher. Registration inspection consequently reported stale. Failed path resolution should preserve uncertainty.

Change and scope

Return the three-state identity from the shared entrypoint comparison. Make isOwnedClientRegistrationCommand a positive-ownership projection of the classifier, removing duplicate command interpretation. Keep exact-path matches, confirmed aliases, package-runner ownership and Windows command-shim handling. Stable launchers across upgrades (#4847) remain outside this fix.

Ordinary fix within existing setup boundaries; a separate maintainer scope decision is not applicable.

Contract and boundary impact

  • Semantic owner: ClientRegistrationIdentity, before status projection.
  • CLI/MCP: doctor reports unknown with uncertainty-specific guidance for unresolved POSIX aliases; no schema or tool-catalog change.
  • Providers, target formats, Evidence and generated metadata: no changes.
  • Installation: ownership checks remain positive-only; unresolved registrations stay outside maintenance and are retained by uninstall.
  • Effects: reads configured launcher paths; no new target execution, network calls or configuration writes.

Evidence and regression coverage

  • Executed initial boundary regressions against base 01cdbbdc5: 3 failures, with the classifier returning foreign and direct/Node-wrapped registration inspections returning stale instead of unknown.
  • Classifier coverage includes dangling registered/current aliases, cyclic aliases, a known different script, equivalent aliases and both command forms.
  • Inspection tests preserve commands and exclude unresolved current aliases from maintenance.
  • Public CLI tests verify doctor reports state: unknown with executable identity cannot be verified; uninstall preserves the original registration bytes. Existing successful alias lifecycle tests remain covered.

Validation performed

Executed on macOS arm64 with Node 24.18.0 and npm 11.16.0:

  • npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/acceptance/setup/launcherAliasesCli.test.ts tests/process-global/updateMaintenance.test.ts — 90 tests passed across 4 files.
  • npm run check — passed, including typecheck, lint, formatting, unused-code, metadata, module boundaries and architecture guards.
  • npm run verify:package — passed, including packaged CLI/MCP, setup/uninstall and update maintenance checks.
  • npm pack --dry-run --json --cache ../npm-cache — passed.

Compatibility, safety, and release

No migration, dependency or release-metadata changes. Real macOS filesystem and CLI workflows were exercised. Linux and native Windows were not run; POSIX symlink regressions skip Windows. No Hopper/Ghidra provider was required or tested. Full repository test suite was not run.


🔄 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/4899 **Author:** [@behalnihal](https://github.com/behalnihal) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/4895-unresolved-launcher-identity` --- ### 📝 Commits (1) - [`76f61f0`](https://github.com/morluto/rea/commit/76f61f099ae8cb725d7aa557a13db33ad7459c64) fix(setup): preserve unresolved launcher identity ### 📊 Changes **4 files changed** (+146 additions, -71 deletions) <details> <summary>View changed files</summary> 📝 `src/application/ClientRegistrationIdentity.ts` (+27 -58) 📝 `tests/acceptance/setup/launcherAliasesCli.test.ts` (+53 -0) 📝 `tests/boundary/filesystem/clientConfigurationDialects.test.ts` (+22 -9) 📝 `tests/boundary/filesystem/clientRegistrationStatus.test.ts` (+44 -4) </details> ### 📄 Description ## Summary Fixes #4895. Preserve unresolved launcher aliases as `unknown` instead of classifying them as foreign registrations. Doctor retains the configured command and shows identity-verification guidance; maintenance and uninstall continue to require positive ownership. ## Problem and expected behavior A dangling symlink such as `broken -> removed.mjs` previously returned `foreign`, just like a confirmed different dispatcher. Registration inspection consequently reported `stale`. Failed path resolution should preserve uncertainty. ## Change and scope Return the three-state identity from the shared entrypoint comparison. Make `isOwnedClientRegistrationCommand` a positive-ownership projection of the classifier, removing duplicate command interpretation. Keep exact-path matches, confirmed aliases, package-runner ownership and Windows command-shim handling. Stable launchers across upgrades (#4847) remain outside this fix. Ordinary fix within existing setup boundaries; a separate maintainer scope decision is not applicable. ## Contract and boundary impact - Semantic owner: `ClientRegistrationIdentity`, before status projection. - CLI/MCP: doctor reports `unknown` with uncertainty-specific guidance for unresolved POSIX aliases; no schema or tool-catalog change. - Providers, target formats, Evidence and generated metadata: no changes. - Installation: ownership checks remain positive-only; unresolved registrations stay outside maintenance and are retained by uninstall. - Effects: reads configured launcher paths; no new target execution, network calls or configuration writes. ## Evidence and regression coverage - Executed initial boundary regressions against base `01cdbbdc5`: 3 failures, with the classifier returning `foreign` and direct/Node-wrapped registration inspections returning `stale` instead of `unknown`. - Classifier coverage includes dangling registered/current aliases, cyclic aliases, a known different script, equivalent aliases and both command forms. - Inspection tests preserve commands and exclude unresolved current aliases from maintenance. - Public CLI tests verify doctor reports `state: unknown` with `executable identity cannot be verified`; uninstall preserves the original registration bytes. Existing successful alias lifecycle tests remain covered. ## Validation performed Executed on macOS arm64 with Node 24.18.0 and npm 11.16.0: - `npm run test:focused -- tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/acceptance/setup/launcherAliasesCli.test.ts tests/process-global/updateMaintenance.test.ts` — 90 tests passed across 4 files. - `npm run check` — passed, including typecheck, lint, formatting, unused-code, metadata, module boundaries and architecture guards. - `npm run verify:package` — passed, including packaged CLI/MCP, setup/uninstall and update maintenance checks. - `npm pack --dry-run --json --cache ../npm-cache` — passed. ## Compatibility, safety, and release No migration, dependency or release-metadata changes. Real macOS filesystem and CLI workflows were exercised. Linux and native Windows were not run; POSIX symlink regressions skip Windows. No Hopper/Ghidra provider was required or tested. Full repository test suite was not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:42:10 +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#6668
No description provided.