Skip to content

[Bug]: doctor repeats OPENCODEX_BUN_PATH guidance when a Bun canary override is already active #848

Description

@luvs01

Client or integration

OpenCodex CLI (ocx doctor, npm packaged install)

Area

CLI / Bun runtime diagnostics

Summary

ocx doctor can tell Windows users to set OPENCODEX_BUN_PATH even when the running service already uses that override. This makes the guidance circular and obscures the difference between the bundled runtime and an explicitly selected, unvalidated canary.

Reproduction

  1. Install @bitkyc08/opencodex@2.8.2-preview.20260731 on Windows.
  2. Set OPENCODEX_BUN_PATH to Bun 1.4.0-canary.1+5f65d3785 and reinstall the service.
  3. Confirm ocx status reports Runtime source: override (OPENCODEX_BUN_PATH).
  4. Run ocx doctor.

It reports Bun 1.4.0, auto-known-bad, then suggests setting OPENCODEX_BUN_PATH to a trusted runtime.

The same wording remains on current dev. src/cli/doctor.ts explicitly notes that the endpoint cannot distinguish a bundled binary from an override with the same version. The service already reports bunRevision; the installed revision is 941 commits ahead of, and 0 behind, the merge commit of oven-sh/bun#32120. This does not require OpenCodex to trust every canary automatically, but it demonstrates why version-only wording is incomplete.

Expected behaviour

Keep the conservative stream policy, but make diagnostics runtime-origin aware:

  • bundled known-bad runtime: retain the override suggestion;
  • active override: say the override is active but remains unvalidated for automatic eager relay, without suggesting the already completed action.

Including bunRevision in the displayed identity would make reports actionable.

Regression coverage

Cover both bundled and override runtimes with the same reported version. The bundled case should offer OPENCODEX_BUN_PATH; the override case should identify the active override and not repeat that instruction.

Version

2.8.2-preview.20260731 (gitHead a5f48e31052fd28547bf383ebc47c9303fa74eaa)

Operating system

Windows 11 Pro 25H2, build 26200.8875, x64

Checks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions