Skip to content

fix(server): preview builds keep their bundled OpenCode 2 compatibility policy - #14368

Merged
juliusmarminge merged 2 commits into
t3code/codex-turn-mappingfrom
v2/preview-bundled-compat
Sep 30, 2026
Merged

juliusmarminge merged 2 commits into
t3code/codex-turn-mappingfrom
v2/preview-bundled-compat

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

[!WARNING] V2 preview-only stopgap: revert before merging into main
Listed on #2829's "Revert before merging into main" checklist.

The server fetches model-manifest.json from main at runtime and adopts its compatibility policy. Main marks OpenCode >=2.0.0 broken (#14198). That is right for stable and nightly, which have no OpenCode 2 runtime, but V2 preview builds do run OpenCode 2, so they show it as broken. A policy's t3CodeRange cannot target preview builds: satisfiesSemverRange drops the prerelease tag, and stable, nightly and preview all share the same 0.0.4x base version.

What changed

  • ModelManifest: when the server's own version (apps/server/package.json, stamped with the full x.y.z-preview.YYYYMMDD.N version by scripts/update-release-package-versions.ts in release.yml) is on the preview channel (cliReleaseChannelOf), a fetched or disk-cached manifest keeps BUNDLED_MODEL_MANIFEST.compatibility. Model lists, defaults and everything else still come from the fetched manifest. The disk cache still stores the unmodified fetched manifest; the override is applied when it is loaded. Stable and nightly behavior is unchanged. make is now makeForVersion(packageJson.version) so tests can build the service for each channel.
  • Bundled model-manifest.json (V2 only; main's copy is untouched): OpenCode >=2.0.18 supported, >=2.0.0 <2.0.18 unsupported, >=1.14.19 <2.0.0 graceful (limited support), <1.14.19 broken, recommendedRange >=2.0.18. recommendedVersion is dropped, because a pinned 1.14.19 would now be a graceful version and the schema requires the recommendation to land in a supported range.
  • The override is marked in code as a temporary V2 preview stopgap to revert before merging into main.

Verification

  • vp test run src/provider/providerCompatibility.test.ts src/provider/ModelManifest.test.ts src/provider/Layers/ProviderRegistry.test.ts src/provider/providerMaintenanceRunner.test.ts src/provider/CodexInstallation.test.ts (apps/server): 5 files, 126 tests passed.
    • New: a preview version (0.0.44-preview.20260929.1) keeps the bundled policy after a refresh that fetches main's OpenCode policy (OpenCode 2.0.18 → supported), including after a restart that reads the disk cache. Stable (0.0.44) and nightly (0.0.44-nightly.20260929.1) adopt the fetched policy (2.0.18 → broken).
    • New: the bundled OpenCode policy classifies 2.0.18 and 2.1.0 as supported, 2.0.0 and 2.0.17 as unsupported, 1.14.19 and 1.99.0 as graceful, 1.14.18 as broken, with recommendedRange >=2.0.18.
    • Mutation check: with the preview branch disabled, only the preview test fails.
  • vp exec tsc --noEmit -p . (apps/server): exit 0, no error TS.
  • vp lint on the touched files: exit 0.
  • vpr knip:check: exit 0.
  • Not run: repo-wide checks, a real preview build, web or mobile clients (no client code changed).

Model: Claude Opus 5.5 (Claude Code)

🤖 Generated with Claude Code


Devin Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 30, 2026
Comment thread apps/server/src/provider/model-manifest.json
@macroscopeapp

macroscopeapp Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This changes the shipped OpenCode compatibility recommendation and status defaults, while adding release-channel-specific behavior that changes provider advisories for preview, stable, and nightly builds. The implementation is focused and tested, but the product-default and user-visible policy changes warrant human review.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire — 4.9 KiB — 6.8 KiB ✅
Codex Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Codex Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Codex Live turn WebSocket decoded — 20.4 KiB — 29.3 KiB ✅
Codex Live turn messages — 2 — 8 ✅
Claude Total thread wire — 4.9 KiB — 6.8 KiB ✅
Claude Thread snapshot wire — 3.7 KiB — 4.9 KiB ✅
Claude Live turn WebSocket wire — 1.2 KiB — 2.0 KiB ✅
Claude Live turn WebSocket decoded — 20.8 KiB — 29.3 KiB ✅
Claude Live turn messages — 2 — 8 ✅

Baseline: unavailable · PR result: 19c0c91 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 106.1 KiB
  • Claude decoded thread snapshot: 106.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

juliusmarminge and others added 2 commits September 30, 2026 11:21
…ty policy

The runtime manifest is fetched from main, whose OpenCode policy marks
OpenCode 2 broken (#14198). That is right for stable and nightly, which
have no OpenCode 2 runtime, but V2 preview builds run it. A policy's
t3CodeRange cannot target preview builds because range matching drops
prerelease tags, so preview builds now keep their bundled compatibility
policy and take the rest of the manifest from the fetch.

The bundled V2 policy supports OpenCode >=2.0.18 and gives
>=1.14.19 <2.0.0 limited support.

Temporary V2-only stopgap, listed on #2829's revert-before-merge checklist.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
They matched no range, so they resolved to unknown and showed no warning.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@juliusmarminge
juliusmarminge force-pushed the v2/preview-bundled-compat branch from ee49d31 to 19c0c91 Compare September 30, 2026 18:22
@juliusmarminge
juliusmarminge merged commit 0fb3731 into t3code/codex-turn-mapping Sep 30, 2026
23 checks passed
@juliusmarminge
juliusmarminge deleted the v2/preview-bundled-compat branch September 30, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant