opencode/packages
Kit Langton 5bc6a7f6d0 test(cli): opt-in pre-built binary for ~3x faster subprocess spawns
\`bun run --conditions=browser src/index.ts\` pays ~15s of JIT + plugin
init + DB migration per subprocess spawn in isolation mode. A pre-built
binary cuts that to ~5s — most of which is now the SQLite \`:memory:\`
migration that runs regardless of execution mode.

Adds \`script/prebuild-test-cli.ts\` which wraps the existing build.ts
with \`--single --skip-embed-web-ui --skip-install\`, then symlinks the
platform-specific output to \`dist/test-cli/bin/opencode\` so the
harness has a stable path.

The harness (test/lib/cli-process.ts) reads OPENCODE_TEST_CLI_PATH and
spawns the binary directly when set; falls back to dev mode otherwise.
Strictly opt-in — default behavior, CI, and local iteration are
unchanged. Anyone who wants the speedup runs:

  bun script/prebuild-test-cli.ts
  export OPENCODE_TEST_CLI_PATH="\$PWD/dist/test-cli/bin/opencode"
  bun test test/cli/

Measured locally:
  Dev mode (default):  29.9s  (331 tests)
  Binary mode:         22.1s  (-26%, after one-time 2.8s build)

The win compounds as more subprocess tests are added — every new test
that hits DB migration saves ~10s vs dev mode.
2026-05-19 11:36:15 -04:00
..
app fix(app): invalidate provider queries after config update to show custom providers immediately (#28313) 2026-05-19 20:31:36 +08:00
console chore: generate 2026-05-19 06:47:00 +00:00
containers chore: Upgrade Bun to the final non-rust version (#27648) 2026-05-18 09:24:26 +10:00
core sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
desktop feat(i18n): add Ukrainian (uk) locale support (#28061) 2026-05-19 14:45:39 +08:00
docs fix(web): favicon rename again 2026-01-21 14:36:21 -06:00
enterprise sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
extensions/zed sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
function sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
http-recorder sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
identity chore: identity cleanup, vscode ext images 2025-12-08 06:47:57 -06:00
llm sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
opencode test(cli): opt-in pre-built binary for ~3x faster subprocess spawns 2026-05-19 11:36:15 -04:00
plugin use keymap state for layer visibility (#26246) 2026-05-19 17:07:26 +02:00
script refactor: replace bun semver with npm semver package 2026-03-09 15:29:55 -04:00
sdk chore: generate 2026-05-19 06:13:16 +00:00
slack sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
storybook Remove unused app ID schema (#27105) 2026-05-12 13:09:23 -04:00
ui feat(i18n): add Ukrainian (uk) locale support (#28061) 2026-05-19 14:45:39 +08:00
web chore(docs): remove beta zen go (#28317) 2026-05-19 12:08:40 +02:00