Repository navigation
Conversation
There was a problem hiding this comment.
The release changes work as described, and I found nothing that should block a merge. In services/update, bun test passes 7/7 and typecheck passes. On the base branch, the two v1 tests (channelsForRef and validGitHubClaims) fail, as they should. I ran script/check-github-latest.ts with a stand-in gh. It passes when Latest is v1.19.0. When Latest is a 2.x tag it fails and points at the right command, gh release edit v1.19.0 … --latest, skipping prereleases and ordering versions correctly. I couldn't run the gh release create/edit step without credentials. Reading it, --verify-tag holds because the tag is pushed earlier in the script, and the step only runs for stable releases when the variable is set.
Public API: unchanged. The update service now also accepts publishes from refs/heads/v1, only to the v1 channel. The response shape and existing refs are unchanged, and the new variables are internal to the release workflow.
One small test cleanup is noted inline.
| }) | ||
| }) | ||
|
|
||
| const rows = [ |
There was a problem hiding this comment.
The v1 channel block (this fake D1 and the two worker.fetch tests) also passes on the base branch. Serving a channel by name already worked; the change is only in channelsForRef. The mock also does its own channel filtering, so these tests mostly check the mock. They could be dropped, leaving the channelsForRef and validGitHubClaims tests to cover the change.
|
How the ACP registry, which IntelliJ, Zed and ACP Patchbay install OpenCode from, updates its two OpenCode entries today:
So once If V1 is to be retired, the registry needs a decision too: either let |
Issue for this PR
Closes #
Type of change
What does this PR do?
This lets OpenCode 2 publish GitHub Releases while OpenCode 1 clients stay on 1.x. It's paired with the v1 PR: #54904.
Every shipped OpenCode 1 update path reads GitHub's Latest release, not the newest one. That covers the CLI for curl/yarn installs,
opencode.ai/install, electron-updater, the old Tauri feed, the GitHub Action and Scoop. So OpenCode 2 releases must never take Latest.script/publish.ts: for stable releases, creates the GitHub Release for the tag with--verify-tag --latest=falseand the reviewedrelease_notesas the body.--latest=false.OPENCODE_V2_GITHUB_RELEASES=true, so merging this doesn't start publishing releases.verify-github-latestjob andscript/check-github-latest.ts: after a stable release, fails loudly if Latest isn't av1.tag. It prints the exactgh release edit <newest v1 tag> --latestcommand and doesn't fix anything itself.notify-discord.ymlnow only announcesv1.releases, so OpenCode 2 is announced once, bynotify-discord-v2. That job links the release page when releases are enabled.channelsForRef("refs/heads/v1")returns["v1"]. V1 can't publish tolatest/dev, and no V2 ref can publish tov1. Tests are added.refs/heads/v2mapping in place, because thev2branch still exists and itspublish.ymlstill triggers on pushes.v1-devchannel: V1 previews keep using theopencode-ai@devnpm tag.docs/release/v1-v2-isolation.mdcovers the rollout order, the flip criteria and commands, the Homebrew Core and Chocolatey caveats, and rollback.Why
--latest=falseis needed:gh release createwithout--latestuses "automatic", and publishing a draft defaultsmake_latesttotrue. Both moved Latest to 2.x in a scratch-repo test; the results are in the doc.How did you verify your code works?
thdxr/latest-flag-test), covering create, re-run without notes, and re-run with new notes. Latest stayed on v1 every time.check-github-latest.tspasses againstanomalyco/opencode(v1.19.0). When the scratch repo's Latest was moved to v2, it failed with the remediation command.bun testinservices/update(7 pass) andbun typecheck.bun run checkpasses; actionlint reports nothing new.Screenshots / recordings
N/A
Checklist
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
Added by the opencode bot (AI-generated).
Related: #52184, #54813, #54066