Skip to content

chore(opencode): move the OpenCode pin and supported floor to 2.4.2 - #497

Merged
chriswritescode-dev merged 2 commits into
mainfrom
chore/opencode-2.4.2
Nov 29, 2026
Merged

chriswritescode-dev merged 2 commits into
mainfrom
chore/opencode-2.4.2

Conversation

@chriswritescode-dev

@chriswritescode-dev chriswritescode-dev commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

User description

Summary

  • Move the catalog (@opencode/client, @opencode/schema, @opencode/plugin, @opencode/theme), OPENCODE_PINNED_VERSION, OPENCODE_MIN_VERSION, the Dockerfile defaults and the CI download to OpenCode 2.4.2. The supported range becomes >=2.4.2 <3.0.0.
  • Raise the ocm-cli @opencode/theme peer to >=2.4.2 and update its compatibility notes.
  • Point the theme palette attribution at the v2.4.2 tag; regenerating the palettes produced no colour changes.
  • OpenCode 2.4 no longer makes server handlers wait for plugins (upstream #63814), so a fresh server answers with a partial integration catalog. The real-binary OAuth and provider tests now wait for plugin.list to report loaded plugins before exercising routes, as upstream recommends for one-shot clients; their assertions are unchanged.
  • Version fixtures that assumed 2.3.x was supported now use the pin and floor constants, or values relative to 2.4.2.

Tests

Backend, frontend and ocm-cli typecheck and lint pass. Frontend tests pass (4127). Backend tests pass except the sandbox runtime and sandbox settings suites, which need Linux /proc and fail on macOS on main as well. The real-binary OAuth and provider suites pass against a local OpenCode 2.4.2.


PR Type

Enhancement, Tests


Description

  • Move OpenCode pin and supported floor to 2.4.2

  • Update catalog packages, Dockerfile defaults, CI download

  • Add waitForOpenCodePluginsLoaded helper for real-binary tests

  • Refresh version fixtures and ocm-cli peer to 2.4.2


Diagram Walkthrough

flowchart LR
  A["Release constants 2.4.2"] -- "pin and floor" --> B["Catalog and Dockerfile"]
  A -- "peer range" --> C["ocm-cli theme peer"]
  A -- "version fixtures" --> D["Backend tests"]
  E["Plugin load wait helper"] -- "used by" --> F["OAuth and provider real-binary tests"]
Loading

File Walkthrough

Relevant files
Enhancement
1 files
release.ts
Bump pinned and minimum OpenCode version                                 
+2/-2     
Tests
11 files
opencode-binary.ts
Add polling helper waiting for loaded plugins                       
+22/-1   
oauth.test.ts
Wait for plugins before real-binary OAuth test                     
+2/-1     
providers.test.ts
Replace integration list call with plugin wait                     
+3/-3     
opencode-binary.test.ts
Use pinned version constant in helper tests                           
+2/-2     
opencode-server-harness.ts
Update default server info version                                             
+1/-1     
index.test.ts
Use version constants in wiring tests                                       
+4/-4     
settings.test.ts
Refresh settings route version fixtures                                   
+33/-33 
opencode-installer.test.ts
Update installer fixtures and range assertions                     
+37/-37 
opencode-single-server.test.ts
Update managed server version expectations                             
+3/-3     
opencode-contract.test.ts
Assert new pin, floor and range                                                   
+20/-18 
opencode-server-registry.test.ts
Update supported version probe fixtures                                   
+6/-6     
Dependencies
2 files
pnpm-workspace.yaml
Move OpenCode catalog entries to 2.4.2                                     
+4/-4     
package.json
Raise theme peer dependency floor                                               
+1/-1     
Configuration changes
2 files
Dockerfile
Update OpenCode install version arguments                               
+2/-2     
ci.yml
Download OpenCode 2.4.2 in CI                                                       
+1/-1     
Documentation
2 files
README.md
Document new OpenCode 2.4.2 requirement                                   
+3/-3     
OPENCODE_THEMES_LICENSE
Point palette attribution at v2.4.2 tag                                   
+1/-1     

Comment on lines +56 to +57
const { data } = await client.api.plugin.list()
if (data.length > 0) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak readiness check

The helper returns as soon as plugin.list reports any plugin at all. The stated goal is to wait until the integration catalog is complete, and one loaded plugin does not prove that the auth or provider plugins these tests rely on have finished. The tests can still be flaky on slow runners. Consider waiting for the specific plugins or providers each test needs (for example anthropic, azure, or OAuth-capable integrations), or for a load-complete status if plugin.list exposes one.

Comment thread backend/test/helpers/opencode-binary.ts Resolved
@lil-worker-cstech

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⚠️ Risk checks: 4 finding(s) detected
Sensitive paths (4): .github/workflows/ci.yml, Dockerfile, ocm-cli/package.json, pnpm-lock.yaml
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
⚠️ Risk level: Low
✅ Merge recommendation: Needs review
Merge recommendation checks
✅ CI on reviewed head: passed
✅ Head is current with its base: up to date
✅ Human authors: all authors are human
⚠️ No sensitive paths or risky changes: 4 finding(s)
⚠️ Changed lines within cap: 451 changed lines exceeds cap 100
🔎 Failure modes

What: The real-binary OAuth and provider tests can still read a partial integration catalog. They then fail now and then on missing providers or methods.
Where: backend/test/helpers/opencode-binary.ts:waitForOpenCodePluginsLoaded
Trigger: `plugin.list` returns the first plugin that finished loading while the others are still loading. This is more likely on slow CI runners.
Detected by: Intermittent assertion failures in `oauth routes against a real OpenCode 2 server` and `providers routes against a real OpenCode 2 server` in the CI job that downloads OpenCode 2.4.2.
Covered in this PR: No

What: The helper times out after 30s with a generic message even though the server is reachable. Every real-binary route test fails.
Where: backend/test/helpers/opencode-binary.ts:waitForOpenCodePluginsLoaded
Trigger: The spawned `opencode serve` config loads zero plugins, so `data.length` stays 0. Or `plugin.list` keeps throwing, for example on an auth or schema mismatch, and the empty catch hides the cause.
Detected by: The thrown `OpenCode server plugins did not load within 30000ms` error in the real-binary suites. The underlying cause is not reported.
Covered in this PR: No

What: Users who already installed ocm 0.7.x alongside OpenCode 2.3.x would see the compatibility table rewritten under them. The table would then disagree with the peer range of the 0.7.x build they have.
Where: ocm-cli/README.md and ocm-cli/package.json:peerDependencies
Trigger: ocm 0.7.x has already been published with an `@​opencode/theme` peer of `>=2.3.0`, and the floor is raised without bumping the ocm minor version.
Detected by: nothing
Covered in this PR: No

🧪 PR contains tests
🔒 No security concerns identified

@chriswritescode-dev
chriswritescode-dev merged commit ca6f098 into main Nov 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant