Skip to content

Add custom source for opencode (stable) to stay on 1.x - #716

Open
danfry1 wants to merge 1 commit into
agentclientprotocol:mainfrom
danfry1:opencode-v1-pin
Open

danfry1 wants to merge 1 commit into
agentclientprotocol:mainfrom
danfry1:opencode-v1-pin

Conversation

@danfry1

@danfry1 danfry1 commented Oct 24, 2026 •

Copy link
Copy Markdown

The opencode entry is updated from GitHub Releases in anomalyco/opencode, and get_github_release_versions takes the highest stable release there without checking which one is Latest. OpenCode plans to publish 2.x GitHub Releases in the same repository without V1 archives, while keeping Latest on 1.x (anomalyco/opencode#54903). After that, the updater would pick a 2.x tag for the V1 entry. verify-updates rejects that update because the archives don't exist, so the entry stays installable, but every run picks a 2.x tag again. The entry then never receives another 1.x release, and each run logs a skipped-update warning. OpenCode 2 already has its own opencode-v2 entry (#657).

Add custom_agent_sources/opencode.py and register it as the ("opencode", "stable") override. It keeps only GitHub Releases in the entry's current major version and returns no resolved assets, so URL rewriting and digest lookup stay on the standard binary path. It returns an UpdateError when releases can't be fetched, when no release in the current major exists, or when the newest one is older than the entry. The existing test_v1_keeps_github_release_source now patches the new source, and tests/test_opencode_source.py covers the 2.x filtering and the error cases.

Moving the opencode entry to 2.x later is a deliberate change: remove the override, or bump the entry's major version by hand. The release listing is one page of 100, so if more than 100 2.x releases were published after the newest 1.x, the entry would stay where it is rather than move to the wrong release.

OpenCode 2 tags are published to the same repository without V1 archives. The standard updater takes the highest stable release, so it would pick a 2.x tag for the V1 entry and stop delivering 1.x updates. Keep the entry on releases in its current major version.
@danfry1 danfry1 changed the title Keep the opencode entry on OpenCode 1.x GitHub Releases Add custom source for opencode (stable) to stay on 1.x Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant