Repository navigation
fix(uninstall): remove the REA-owned ZCode fallback registration - #2783
Conversation
ZCode loads the user-scope `~/.agents/mcp.json` `mcpServers` fallback whenever its native `mcp.servers` table is empty. Uninstall removed REA only from the native table, so a REA-owned fallback entry became eligible to load again once the last native server was gone, while uninstall reported ZCode as removed and complete. Also visit the ZCode fallback as a standard `mcpServers` JSON configuration in the uninstall host. It goes through the same ownership check, `.rea.backup`, readback and restore path as every other client configuration, so other fallback servers and settings, and a foreign `rea` entry, are preserved. Its result merges into the ZCode item. Fixes #2664 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3320f24e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Address review findings at their producing boundaries and preserve directly affected consumers. Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request.
|
Review findings addressed at their producing boundaries and consumers. Latest changes were reviewed from source; tests and provider runs were skipped at the maintainer's request. Findings requiring separate decisions or verification remain open. The synthetic fallback entry selected the generic JSONC dialect. It now uses an explicit zcode_fallback dialect routed to the existing strict JSON.parse owner, including readback. Configuration editing and backup ownership are unchanged. Added comment/trailing-comma/BOM cases proving malformed fallback text remains unchanged without a backup/write. Source inspection and git diff --check completed. Tests and automated checks were not run at the user’s explicit request. Commit: 6ae4887 |
* fix(comparison): preserve incomplete function call evidence Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty. Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls. * fix(comparison): recheck historical calls-only changes --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix: repair the static-check failures on the default branch
The default branch fails its own required `Static checks` job three ways, so
every pull request reports that job as failed regardless of its own change.
- `npm run format:check` reports `src/domain/functionComparison.test.ts` and
`src/ida/IdaOperationRunner.ts`.
- `npm run lint` reports a duplicate `import { join } from "node:path"` in
`tests/boundary/mcp/ghidraInventoryMcp.test.ts` (lines 4 and 17).
- `npm run typecheck` reports `format: "devin"` missing from the client format
union in `src/application/SupportedClients.ts`, and an unchecked index in
`tests/boundary/cli/clientProfileLifecycle.test.ts`, whose pair array is
inferred as `string[][]`.
Apply the pinned formatter, drop the duplicate import, list the `"devin"` format
that its own definition already uses, and mark the pair array `as const`.
Validation: `npm run check:fast` and `npm run format:check` pass.
* fix(setup): keep Devin on the JSON configuration dialect
---------
Co-authored-by: 吴佳浩 <wujiahao@supremind.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6305f8309b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| clients.flatMap((client) => | ||
| uninstallConfigPaths(client).map((configPath) => ({ | ||
| clients.flatMap((client) => [ | ||
| ...uninstallConfigPaths(client).map((configPath) => ({ |
There was a problem hiding this comment.
Remove the ZCode fallback before the native config
When the fallback copy or write fails after preflight (for example, a filesystem error while creating its backup), removeAll stops without rolling back the already-removed native entry. With this ordering, a native table whose only server was REA becomes empty while the fallback still contains REA, so ZCode activates the fallback registration again despite uninstall reporting failure. Process the fallback entry before the native entry so a later native failure leaves the active native registration intact.
Useful? React with 👍 / 👎.
Keep layered environment choices, current byte-exact recovery snapshots, and package-manager failure details. Report pinned package drift without claiming runner resolution. Retain failed Linux installer cleanup for host-owned retry while preserving the install outcome. Reviewed fixes include #2632, #2769, #2783, #2959, #2979, #2983, #2995, #3009, and #2559. Validation: 98 focused setup/registration tests passed; 45 Linux installer tests passed. Real Linux package installation remains unverified.
Fixes #2664.
Problem
ZCode reads the user-scope
~/.agents/mcp.jsonmcpServersfallback whenever its native~/.zcode/cli/config.jsonmcp.serverstable 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
reaentry in both places,rea uninstallreportedstatus: completeand ZCoderemoved. But the native table ended up empty and the fallback still held REA's registration, which ZCode would load again. Doctor then reported ZCodemissing.Fix
systemUninstallHost().clients()now also yields the ZCode fallback as a standardmcpServersJSON configuration (format: "json",configPath: zcodeFallbackPath). It reuses the existing uninstall path unchanged:isOwnedRegistration), so a foreign command stored underreais retained;.rea.backupbefore editing, readback verification, and restore on failure;collapseUninstallItems, like multi-path clients.docs/client-configuration.mdnow states that uninstall removes REA's own entry from both locations.Validation
New
zcodeClientConfiguration.test.ts > ZCode fallback uninstalltests run the realrunUninstall(false, systemUninstallHost(home))on a disposable home:uiand theotherserver are kept, the fallback.rea.backupequals the original, and ZCode reportsremoved.reaentry 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:checkandformat:checkpass.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