chore(opencode): move the pinned OpenCode version to 2.1.2

The supported floor is derived from the pin, so this raises the accepted
range to >=2.1.2 <3.0.0 for the bundled image, managed installs, and the
version check that gates startup.

- Dockerfile ARG OPENCODE_VERSION and the shared pin move together
- CI e2e installs 2.1.2 instead of 2.0.24
- contract, installer, manager, registry and settings fixtures follow the new
  floor, keeping their below-floor and wrong-major rejection cases
This commit is contained in:
Chris Scott committed 2026-10-23 14:41:48 -04:00
1 parent 36a5693b5c
commit 19b52ecd58
9 files changed
+191 -189

No files matched your search

@@ -449,7 +449,7 @@ describe('OpenCodeServerRegistry', () => {
describe('test', () => {
it('reports a supported version', async () => {
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.0.15' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.1.2' }))
const result = await registry.test({
baseUrl: 'https://studio.example.com/',
@@ -457,7 +457,7 @@ describe('OpenCodeServerRegistry', () => {
password: 'super-secret',
})
expect(result).toEqual({ ok: true, version: '2.0.15', versionSupported: true, error: null })
expect(result).toEqual({ ok: true, version: '2.1.2', versionSupported: true, error: null })
expect(fetchFn.mock.calls[0]?.[0]).toBe('https://studio.example.com/api/info')
const headers = new Headers(fetchFn.mock.calls[0]?.[1]?.headers)
expect(headers.get('authorization')).toBe(`Basic ${btoa('alice:super-secret')}`)
@@ -478,7 +478,7 @@ describe('OpenCodeServerRegistry', () => {
username: 'alice',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.0.15' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.1.2' }))
const result = await registry.test({ serverId: server.id })
@@ -493,7 +493,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.0.15' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.1.2' }))
const result = await registry.test({
baseUrl: 'https://studio.example.com/opencode',
@@ -513,7 +513,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.0.15' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.1.2' }))
const result = await registry.test({
baseUrl: 'https://relocated.example.com',
@@ -533,7 +533,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.0.15' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.1.2' }))
await registry.test({
baseUrl: 'https://studio.example.com',