fix(plugin-config): ensure both legacy and renamed config files are discovered (fixes #3133)#3431
Open
MoerAI wants to merge 1 commit intocode-yeongyu:devfrom
Open
fix(plugin-config): ensure both legacy and renamed config files are discovered (fixes #3133)#3431MoerAI wants to merge 1 commit intocode-yeongyu:devfrom
MoerAI wants to merge 1 commit intocode-yeongyu:devfrom
Conversation
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Fixes config discovery inconsistency by using existing detection utility and adds comprehensive regression tests for legacy/canonical precedence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
oh-my-openagentoroh-my-opencodeconfig file actually existsProblem
Some code paths still treated the plugin config path as a fixed canonical
oh-my-openagent.jsonfallback instead of resolving the active file on disk. That made discovery inconsistent when users only had a legacyoh-my-opencode.json[c]file or a.jsoncvariant, even though the loader itself supports both basenames during the rename transition.Fix
Update
getOpenCodeConfigPaths()to usedetectPluginConfigFile()so shared path resolution consistently returns the real active plugin config file across old/new basenames and.json/.jsoncextensions. Add regression tests to lock in legacy fallback behavior and canonical-name precedence when both variants are present.Changes
src/shared/opencode-config-dir.tsomoConfigfrom detected plugin config files instead of a fixed canonical.jsonpathsrc/shared/opencode-config-dir.test.tsFixes #3133
Summary by cubic
Ensure plugin config discovery resolves the actual file on disk, whether legacy
oh-my-opencodeor renamedoh-my-openagent, across.json/.jsonc. Canonical is preferred when both exist. Fixes #3133.getOpenCodeConfigPaths()to usedetectPluginConfigFile()and setomoConfigto the detected path, preferringoh-my-openagentwhen both variants exist.Written for commit dacaeb4. Summary will update on new commits.