Repository navigation
fix(setup): honor active client configuration and skill roots - #1504
Conversation
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: 1a5a0ee946
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7f5440052
ℹ️ 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".
An empty OPENCODE_CONFIG_DIR now stays on the XDG directory, and doctor and setup inspect global OpenCode files when a custom directory is absent. Uninstall reports one status per client so a missing earlier layer does not hide a removed registration.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
TL;DR: All seven fixes work on Linux at head
On this PR, every second setup changed nothing. Uninstall removed every REA entry and skill copy. It kept comments, other servers and other settings. The
Small notes
Not run
Thanks, morluto, for the careful fix and the clear examples in the PR text. CommandsEach run used a fresh fake home and a separate scratch folder. The steps were dry run, setup, doctor, setup again, then uninstall. Each step ran like this, with env -i PATH="$NODE24/bin:/usr/bin:/bin" HOME="$FAKE" TMPDIR="$FAKE/tmp" \
XDG_CONFIG_HOME="$FAKE/.config" XDG_DATA_HOME="$FAKE/.local/share" \
XDG_CACHE_HOME="$FAKE/.cache" XDG_STATE_HOME="$FAKE/.local/state" \
npm_config_cache="$FAKE/.npm" npm_config_prefix="$FAKE/.npm-global" npm_command=exec \
timeout 60 node scripts/rea.mjs setup --client gemini_cli --yes --format jsonTests: Test setup
🤖 Generated with Claude Code (Opus 5.5) 🦊 |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…o#1504) * refactor(setup): resolve skill destinations per client * fix(setup): honor active client configuration and skill roots * fix(setup): validate effective client scopes and Gemini trust * fix(setup): treat empty OpenCode overrides as unset An empty OPENCODE_CONFIG_DIR now stays on the XDG directory, and doctor and setup inspect global OpenCode files when a custom directory is absent. Uninstall reports one status per client so a missing earlier layer does not hide a removed registration. --------- Co-authored-by: Cursor Agent <[email protected]>
Summary
Setup could report ready after writing configuration or skills the selected client never reads. Doctor could overlook a higher-priority disabled or managed registration, and uninstall could expose an older registration. This corrects the confirmed client integration failures from the maintainer audit; no separate issue was opened for the grouped correction.
Problem and expected behavior
GEMINI_CLI_HOME=/profiles/workmust select that home's settings and skills. OpenCode must inspect its normal global files even withOPENCODE_CONFIG_DIRset, then apply explicit/custom-file precedence. Gemini must account for trusted workspace policies and same-name system server overrides before reporting readiness.Setup plans and changes user-owned registration files only. A conflicting immutable registration or blocking policy returns
needs_humanwith no planned/applied actions and a source-specific remediation. Doctor reports the conflict rather than aligned. Uninstall removes owned OpenCode registrations from every applicable user file.Change and scope
mcpServersas a shallow merge: a winning workspace/system entry replaces the entire user entry. Block a conflicting definition; accept an identical one; retain the source path.disabled=trueis ignored;enabled=falseand the root denylist still disable it.No new client adapter, model request, analysis-provider change, or dependency change. MiniMax was inspected separately below; this PR does not advertise automatic MiniMax registration.
Contract and boundary impact
Evidence and regression coverage
Public CLI regression journeys cover seven affected integrations, Gemini policy consolidation/managed definitions/persisted and explicit trust, OpenCode custom-plus-global cleanup, malformed files, backups, preservation, and repeat behavior.
Previous base reproductions reported ready/healthy for wrong roots or suppressed registrations. New tests assert the effective paths and reject conflicts before writes.
Representative blocked output:
status: "needs_human", empty actions, and a namedmcp.allowed,mcp.excluded, ormcpServers.reasource remediation.Downloaded exact npm artifacts and inspected their shipped implementations: Gemini CLI 0.63.0, Grok Build 1.0.50, MiniMax Code 0.6.5. All runtime probes used isolated homes without authentication or model calls.
Unmodified public Gemini CLI connected to REA and enabled the installed shared skill. Native Grok completed a real MCP handshake and discovered 139 REA tools and its skill. Installed MiniMax's unmodified runtime also discovered 139 REA tools and cataloged the skill; its public ACP session creation requires login, so that authenticated journey was not claimed.
Gemini workspace/trust probes execute the shipped loader. Managed merger probes supply scopes to its unchanged settings class; they do not establish privileged managed-file loading.
Remaining gaps: no Windows/Linux native harness session, IDE-only trust, model turn, or analysis-provider run. Gemini 0.63.0 additionally skips managed files failing OS ownership/permission checks; REA conservatively considers configured managed paths and can request manual review for a file that release ignores. MiniMax has no REA setup adapter; external-skill disabling hides its shared skill root. Its accepted relative data-directory override later fails in native plan initialization.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
On macOS, Node 24.18.0 / npm 11.16.0:
npm run test:focused --with 16 client/setup/registration test files — 228 passed.npm run check— passed: types, lint/module boundaries, formatting, Knip, metadata and architecture guards.npm run docs:check— passed.npm run verify:package— passed, including installed CLI/MCP, setup/uninstall/backups, bundled skill and Skills 1.7.2 discovery; 139 tools.npm pack --dry-run— passed.Compatibility, safety, and release
Review checklist