[PR #2783] [MERGED] fix(uninstall): remove the REA-owned ZCode fallback registration #5389

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-2664


📝 Commits (10+)

  • a3320f2 fix(uninstall): remove the REA-owned ZCode fallback registration
  • 6ae4887 fix(uninstall): preserve the strict ZCode fallback dialect
  • 00a334a chore: merge captured main into PR 2783
  • 235d611 fix(comparison): recheck historical calls-only changes (#2223)
  • cf95368 fix(ci): isolate Linux Hopper process fixture inventory
  • ffd9866 fix(android): make DEX descriptor pattern portable
  • 014e5bf fix: repair the static-check failures on the default branch (#2895)
  • b2578ba chore(merge): refresh PR #2783 with main
  • 7c716b4 chore(merge): refresh PR #2783 with latest main
  • 47422fd Merge branch 'main' into fix/issue-2664

📊 Changes

5 files changed (+109 additions, -6 deletions)

View changed files

📝 docs/client-configuration.md (+5 -1)
📝 src/application/ClientConfigurationDocument.ts (+2 -1)
📝 src/application/SupportedClients.ts (+1 -0)
📝 src/application/Uninstall.ts (+12 -3)
📝 tests/boundary/filesystem/zcodeClientConfiguration.test.ts (+89 -1)

📄 Description

Fixes #2664.

Problem

ZCode reads the user-scope ~/.agents/mcp.json mcpServers fallback whenever its native ~/.zcode/cli/config.json mcp.servers table is empty (docs/client-configuration.md). Setup already accounts for this: it copies fallback servers into the native table when writing the first native server.

Uninstall only edited the native table. With a REA-owned rea entry in both places, rea uninstall reported status: complete and ZCode removed. But the native table ended up empty and the fallback still held REA's registration, which ZCode would load again. Doctor then reported ZCode missing.

Fix

systemUninstallHost().clients() now also yields the ZCode fallback as a standard mcpServers JSON configuration (format: "json", configPath: zcodeFallbackPath). It reuses the existing uninstall path unchanged:

  • ownership check (isOwnedRegistration), so a foreign command stored under rea is retained;
  • .rea.backup before editing, readback verification, and restore on failure;
  • other fallback servers and settings are preserved;
  • a missing fallback is "skipped". Its result merges into the single ZCode item through collapseUninstallItems, like multi-path clients.

docs/client-configuration.md now states that uninstall removes REA's own entry from both locations.

Validation

  • New zcodeClientConfiguration.test.ts > ZCode fallback uninstall tests run the real runUninstall(false, systemUninstallHost(home)) on a disposable home:

    • With an owned entry in both locations, both are removed. ui and the other server are kept, the fallback .rea.backup equals the original, and ZCode reports removed.
    • A fallback-only owned entry is removed, and a foreign rea entry is kept.

    Both fail on main and pass here.

  • All uninstall/setup suites pass: 23 files, 360 tests, including tests/acceptance/setup. npm run check:fast, docs:check and format:check pass.

  • Not run: actual ZCode startup.

Behavior note: a malformed or unreadable fallback file now stops uninstall with a repair message, the same way a malformed native config already does. Uninstall can't tell whether such a file still holds REA's registration.

🤖 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/2783 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `fix/issue-2664` --- ### 📝 Commits (10+) - [`a3320f2`](https://github.com/morluto/rea/commit/a3320f24e744467c40a22a7927d8bd076dbbe8f8) fix(uninstall): remove the REA-owned ZCode fallback registration - [`6ae4887`](https://github.com/morluto/rea/commit/6ae4887cb09623882e4de48796d2b84a20774287) fix(uninstall): preserve the strict ZCode fallback dialect - [`00a334a`](https://github.com/morluto/rea/commit/00a334a08ff1bdc0ab37458c6a92d43c281bbd3a) chore: merge captured main into PR 2783 - [`235d611`](https://github.com/morluto/rea/commit/235d611feb74569bcc6de853c708456e877e1379) fix(comparison): recheck historical calls-only changes (#2223) - [`cf95368`](https://github.com/morluto/rea/commit/cf953681bdbaf3e6eae521ba2a86e96fdb8b2314) fix(ci): isolate Linux Hopper process fixture inventory - [`ffd9866`](https://github.com/morluto/rea/commit/ffd98662fc5f86bb12fc667828e748c6eebf1523) fix(android): make DEX descriptor pattern portable - [`014e5bf`](https://github.com/morluto/rea/commit/014e5bf8228d477f162ebc8619146850e4f89681) fix: repair the static-check failures on the default branch (#2895) - [`b2578ba`](https://github.com/morluto/rea/commit/b2578baccba6b1a03f8c7e0627ce1ed8689bbad0) chore(merge): refresh PR #2783 with main - [`7c716b4`](https://github.com/morluto/rea/commit/7c716b4185356c06c1ae3fce8b9ed02c0c8c7194) chore(merge): refresh PR #2783 with latest main - [`47422fd`](https://github.com/morluto/rea/commit/47422fd0dddb7ca741820268c35669d187cf8ef3) Merge branch 'main' into fix/issue-2664 ### 📊 Changes **5 files changed** (+109 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `docs/client-configuration.md` (+5 -1) 📝 `src/application/ClientConfigurationDocument.ts` (+2 -1) 📝 `src/application/SupportedClients.ts` (+1 -0) 📝 `src/application/Uninstall.ts` (+12 -3) 📝 `tests/boundary/filesystem/zcodeClientConfiguration.test.ts` (+89 -1) </details> ### 📄 Description Fixes #2664. ## Problem ZCode reads the user-scope `~/.agents/mcp.json` `mcpServers` fallback whenever its native `~/.zcode/cli/config.json` `mcp.servers` table is empty (`docs/client-configuration.md`). Setup already accounts for this: it copies fallback servers into the native table when writing the first native server. Uninstall only edited the native table. With a REA-owned `rea` entry in both places, `rea uninstall` reported `status: complete` and ZCode `removed`. But the native table ended up empty and the fallback still held REA's registration, which ZCode would load again. Doctor then reported ZCode `missing`. ## Fix `systemUninstallHost().clients()` now also yields the ZCode fallback as a standard `mcpServers` JSON configuration (`format: "json"`, `configPath: zcodeFallbackPath`). It reuses the existing uninstall path unchanged: - ownership check (`isOwnedRegistration`), so a foreign command stored under `rea` is retained; - `.rea.backup` before editing, readback verification, and restore on failure; - other fallback servers and settings are preserved; - a missing fallback is "skipped". Its result merges into the single ZCode item through `collapseUninstallItems`, like multi-path clients. `docs/client-configuration.md` now states that uninstall removes REA's own entry from both locations. ## Validation - New `zcodeClientConfiguration.test.ts > ZCode fallback uninstall` tests run the real `runUninstall(false, systemUninstallHost(home))` on a disposable home: - With an owned entry in both locations, both are removed. `ui` and the `other` server are kept, the fallback `.rea.backup` equals the original, and ZCode reports `removed`. - A fallback-only owned entry is removed, and a foreign `rea` entry is kept. Both fail on main and pass here. - All uninstall/setup suites pass: 23 files, 360 tests, including `tests/acceptance/setup`. `npm run check:fast`, `docs:check` and `format:check` pass. - Not run: actual ZCode startup. Behavior note: a malformed or unreadable fallback file now stops uninstall with a repair message, the same way a malformed native config already does. Uninstall can't tell whether such a file still holds REA's registration. 🤖 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-31 01:06: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#5389
No description provided.