You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Diagnose a below-floor Bun in the plugin entry before the engine import throws #618
Observed (reproduced locally and by an outside reviewer)
On a Bun host below the store's real floor (< 1.4.0, which lacks node:sqlite), the default plugin entry fails at import time and the user gets advice unrelated to the cause:
opencode-self-improvement: failed to load from ...: ResolveMessage: No such built-in module: node:sqlite
opencode-self-improvement: a loose copy under <config>/plugins/ needs its runtime dependencies — run `bun install` in that directory, or install the package with `opencode plugin add opencode-self-improvement`.
MIN_BUN and bunFloorWarning() exist and are correct in isolation (test/host/runtime.test.ts), but they run inside setupMemory, which is unreachable: the engine graph statically imports node:sqlite, so the module graph never finishes loading. Outside repro on official Windows x64 Bun 1.3.0 agrees; local repro on macOS arm64 with the 1.3.0 and 1.3.14 official binaries imports the default entry and sees exactly the two lines above.
Requirement
Check the host runtime before importing the engine: the entry point (and any adapter entry reachable on Bun) resolves the floor from a pure module (no node:sqlite in its import closure) and, below floor, registers nothing and prints the accurate one-line diagnostic — the plugin goes inert with a true reason, not with dependency-install advice.
Cover it with a real old-runtime entry-point test, not helper-level unit tests: pin an official pre-1.4.0 Bun binary in CI (download step, following the pi job's interpreter-pin precedent) and assert the old host gets the floor line, an inert plugin, and no ResolveMessage.
Non-goal
The compatibility policy is settled: 1.4.0 is the floor in engines.bun, MIN_BUN, and ADR 0010. This ticket only delivers the diagnostic that was claimed and is not reachable today.
Activity