Skip to content

fix(cli): keep platform variants below wrapper versions - #2430

Open
mynameistito wants to merge 2 commits into
UsefulSoftwareCo:mainfrom
mynameistito:fix/bun-platform-variant-version-order
Open

mynameistito wants to merge 2 commits into
UsefulSoftwareCo:mainfrom
mynameistito:fix/bun-platform-variant-version-order

Conversation

@mynameistito

Copy link
Copy Markdown
Contributor

Fixes #2429

Cause

The CLI wrapper and its platform binaries publish as versions of the same npm package. Platform versions were formed by appending the platform name to the full wrapper version, for example 2.0.0-beta.31-win32-x64. Under SemVer, that variant sorts higher than 2.0.0-beta.31, so an updater comparing available executor versions can select the platform artifact as the globally installed package. The variant intentionally has no bin entry; only the wrapper provides the executor command.

Change

  • Put platform variants under a numeric 0 prerelease identifier, for example 2.0.0-0.beta.31.windows-x64. This sorts below its wrapper version while keeping the exact channel version and platform in the variant version.
  • Derive each platform's npm dist-tag from its staged package directory, since the platform tag is no longer the final part of the version string.
  • Add a patch changeset for the CLI package.

The wrapper's npm: aliases and platform filtering stay the same. The new version ordering prevents bun update --latest and similar updaters from preferring a binary variant over the installable wrapper.

Validation

  • Ran bunx --yes oxfmt apps/cli/src/build.ts .changeset/bun-global-update.md.
  • git diff --check passed.
  • Tests were not run.

@mynameistito

Copy link
Copy Markdown
Contributor Author

Note

🤖 Codex responding on behalf of mynameistito

Local validation on a516532:

  • bun --bun vitest run src/platform-variant-version.test.ts: 3 passed.
  • git diff --check: passed.
  • bun run typecheck: still reports signal-listener typing errors in untouched apps/cli/src/main.ts, apps/local/src/mcp.ts, and apps/local/src/serve.ts; it reports no errors in the changed files.

The CI run on the previous head (76d67cc) had one cloud E2E failure in connection-health-verdict.test.ts:450, where the test timed out waiting for the “Degraded” connection status. That failure is outside the packaging changes. No checks have appeared yet for the updated head.

@mynameistito

Copy link
Copy Markdown
Contributor Author

Note

🤖 Codex responding on behalf of mynameistito

I reproduced the issue with Bun 1.4.4 (38afee6c8) in an isolated temporary BUN_INSTALL directory:

  1. bun install -g executor@beta --trust installed executor@2.0.0-beta.31.
  2. bun update --global --latest changed the global dependency to ^2.0.0-beta.31-win32-x64.
  3. Running the isolated executor.exe --version failed with MODULE_NOT_FOUND for install/global/node_modules/executor/bin.mjs.
  4. Reinstalling executor@beta restored the wrapper; executor --version printed executor v2.0.0-beta.31.

The local regression test passes with the proposed variant format (2.0.0-0.beta.31.windows-x64), which places the binary under a numeric prerelease identifier before the wrapper's beta identifier. The reproduction used a temporary Bun global directory, so it did not change the machine's existing global packages.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Bun global update selects the Windows platform variant instead of the Executor wrapper

1 participant