Skip to content

fix(provider): bun global updates advertise a version bun will install - #30633

Draft
Snehit70 wants to merge 3 commits into
pingdotgg:mainfrom
Snehit70:fix/hide-blocked-provider-update
Draft

Snehit70 wants to merge 3 commits into
pingdotgg:mainfrom
Snehit70:fix/hide-blocked-provider-update

Conversation

@Snehit70

@Snehit70 Snehit70 commented Nov 4, 2026

Copy link
Copy Markdown

Problem

For bun-global providers (OpenCode v2, @opencode/cli), T3 Code advertises npm's latest dist-tag. bun's [install] minimumReleaseAge refuses releases newer than the limit, so bun i -g pkg@latest installs the newest older release instead. T3 then shows "Update command completed, but T3 Code still detects an outdated provider version." and keeps offering the same update until the release ages past the limit.

Repro: minimumReleaseAge = 604800 in ~/.bunfig.toml, OpenCode installed at 2.2.0, npm latest at 2.2.5 (published 2026-10-30). bun add @opencode/cli@latest installs 2.2.0 and exits 0. An exact pin to 2.2.4 fails with blocked by minimum-release-age. Details are in #30632.

Change

  • When ~/.bunfig.toml sets [install] minimumReleaseAge and the package is not in minimumReleaseAgeExcludes, the bun-global latest lookup returns the newest stable version whose npm publish time is at least that old. The advertised version now matches what @latest installs.
  • The update command stays bun i -g <pkg>@latest. Pinning the version would fail for versions bun refuses, so it is not used.
  • If there is no release-age setting, the package is excluded, npm is missing, the time lookup fails, or no version is eligible, the lookup returns null and the existing npm latest behavior applies.
  • Pure helpers parseBunReleaseAgeConfig and selectReleaseAgeEligibleVersion are exported and unit-tested.

Only bun-global installs change. npm-global is handled by #24062. pnpm is handled by #19580. Vite+ global installs are not covered.

Scope and approval

Triage issue: #30632. It is awaiting maintainer triage, so this PR is a draft until the issue is triaged. This is the bun counterpart of the npm and pnpm policy in #15329 and #19580: T3 advertises only the version the package manager running the update will install. #21422 and #14249 are the related closed issues.

Verification

  • Standalone Bun check of the two pure helpers, extracted verbatim from maintenanceResolver.ts: bunfig parsing ([install] vs [run] scoping, comments, excludes, no-setting case) and eligible-version selection (prerelease and dev tags skipped, created/modified keys ignored, cutoff boundary, all-too-new returns null). Passed.
  • Probed the real registry data for @opencode/cli with bun 1.3.3 under minimumReleaseAge = 604800: @latest installed 2.2.0. The helper selects 2.2.0 from the same publish times.
  • Not run: vp test / vitest for maintenanceResolver.test.ts, typecheck, and lint. pnpm install --frozen-lockfile failed in my environment with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION (@effect/sql-d1@4.1.1, inside the local 7-day policy). The repo's tests need to run in CI or a clean checkout.
  • Not checked: a real bun i -g update through the T3 UI.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 4, 2026

This branch has not been deployed

No deployments
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:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant