fix(cli): write version-aware plugin entry during installation#681
Merged
kdcokenny merged 3 commits intocode-yeongyu:devfrom Jan 14, 2026
Merged
Conversation
Contributor
|
All contributors have signed the CLA. Thank you! ✅ |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 3/5
- Installer currently aborts if any oh-my-opencode plugin entries exist in
src/cli/config-manager.ts, so users can’t switch channels or versions and stale plugin definitions persist—this is a real regression risk for updates. - Pay close attention to
src/cli/config-manager.ts- ensure the installer updates existing plugin entries instead of exiting early.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="src/cli/config-manager.ts">
<violation number="1" location="src/cli/config-manager.ts:240">
P1: Installer exits when any oh-my-opencode plugin exists, so it never updates the entry to the requested version/tag, blocking channel/version switches and leaving stale plugin entries.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Previously, the installer always wrote 'oh-my-opencode' without a version, causing users who installed beta versions (e.g., bunx oh-my-opencode@beta) to unexpectedly load the stable version on next OpenCode startup. Now the installer queries npm dist-tags and writes: - @latest when current version matches the latest tag - @beta when current version matches the beta tag - @<version> when no tag matches (pins to specific version) This ensures: - bunx oh-my-opencode install → @latest (tracks stable) - bunx oh-my-opencode@beta install → @beta (tracks beta tag) - bunx oh-my-opencode@3.0.0-beta.2 install → @3.0.0-beta.2 (pinned)
6d42cb3 to
1a5fdb3
Compare
Contributor
Author
|
recheck |
kdcokenny
pushed a commit
that referenced
this pull request
Jan 13, 2026
Collaborator
|
Thanks! This solves a real pain point for our beta users. The implementation is clean and the test coverage is excellent. 👍
|
- Prioritize 'latest', 'beta', 'next' tags in getPluginNameWithVersion() to ensure deterministic results when version matches multiple tags - Add 5s timeout to fetchNpmDistTags() to prevent blocking on slow networks - Remove unused 'join' import from node:path - Merge upstream/dev and resolve conflicts in config-manager.test.ts
85409dc to
8395a6e
Compare
Contributor
Author
|
recheck |
Collaborator
|
lgtm, thanks for the contribution! 🚀 |
sssgun
pushed a commit
to sssgun/oh-my-opencode
that referenced
this pull request
Jan 18, 2026
sssgun
pushed a commit
to sssgun/oh-my-opencode
that referenced
this pull request
Jan 18, 2026
…rsion-pinning fix(cli): write version-aware plugin entry during installation
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
Problem
When users installed with
bunx oh-my-opencode@3.0.0-beta.3 install, the installer wrote"oh-my-opencode"without version. On next OpenCode startup, npm resolved this tolatesttag (2.14.0), not the beta version the user intended.Solution
Query npm dist-tags and write appropriate version suffix:
bunx oh-my-opencode install@latestbunx oh-my-opencode@beta install@betabunx oh-my-opencode@3.0.0-beta.2 install@3.0.0-beta.2Changes
fetchNpmDistTags()to query npm registry for all dist-tagsgetPluginNameWithVersion()to determine correct plugin entry formataddPluginToOpenCodeConfig()to use version-aware entriesTesting
Summary by cubic
Fixes the CLI installer to write a version-aware oh-my-opencode plugin entry based on npm dist-tags. This keeps beta/next installs on their intended channel instead of falling back to stable.
Written for commit 8395a6e. Summary will update on new commits.