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
hussain added a commit to solutionsunity/acp-patchbay that referenced this pull request Nov 6, 2026
An entry that moved back, as asked for `opencode` in
agentclientprotocol/registry#716, was offered as an Upgrade: agentUpdates
compared the two versions for equality only, so any different version counted.
It now weighs them with isNewer, the project's one ordering of versions. The
registry's schema fixes `version` to x.y.z, so its numbered parts cover every
listed version.

The Settings card, the agent's chip and the notice read that one fact, but
Upgrade itself didn't: it resolves from a fresh read, so a chip shown before
the entry moved back still downgraded on click. The writer now consults the fact
after that read and refuses, asking nothing and stopping nothing.

What else this changes:
- Upgrade when the fresh read equals the pin used to ask, stop and restart; it
  now refuses too, which leaves previousAfterUpgrade's same-version branch
  unreachable, so that is gone.
- A version that doesn't read as x.y.z, on either side, is never offered.
- The refusal is a new native warning.

Closes #148
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