Repository navigation
fix(uninstall): preserve layered OpenCode registrations - #7969
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. |
[Medium impact] The reviewed changes appear safe to merge, with no new blocking findings. SummaryUninstall now checks OpenCode’s combined configuration before removing owned registrations.
No new actionable issues were found. Source review confirms the previous legacy-removal finding is fixed. Tests were inspected, not run. Whether another PR supersedes this one could not be checked because GitHub access was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Inspect selected configurations] --> B[Compare combined OpenCode registration before and after removal]
B --> C{Foreign registration activated or changed?}
C -->|Yes| D[Refuse before changes or backups]
C -->|No| E[Finish all remaining checks]
E --> F[Remove owned entries with backups]
Reviews (3) · Last reviewed commit: "Merge branch 'main' into codex/opencode-..." · Reviewed by Greptile |
Problem and change
Fixes #7321. Removing an owned OpenCode registration from one user configuration layer could activate a foreign fallback in another layer. An upper foreign entry can also depend on fields inherited from the owned lower entry. Uninstall now preflights the effective layered configuration using the existing removal and merge owners and refuses before changes when removing an owned fragment would alter a foreign or unresolved effective registration.
Validation
npm run check:fastandgit diff --checkpassed. An independent controlled reproduction confirmed the foreign merged-fragment case remains unchanged.Review follow-up: the layered preflight also applies when removing an owned V1 entry beside a V2 table. The new legacy/foreign-fragment regression failed before the fix and passes now; 72 focused tests and
check:fastpassed. An independent controlled reproduction confirmed the effective foreign entry and both files remain unchanged. Real OpenCode and concurrent peer-layer edits remain unverified.Author readiness
Human owner: NOT_ENOUGH_INFO