cloudaxe-opencode/packages/opencode/test/cli
Kit Langton 75c507f769 refactor(test/cli): migrate serve/acp builders to AppProcess.spawn
Slice 2 of the CLI harness Effect migration. Drops the last raw
Bun.spawn call sites in withCliFixture.

- `serve` and `acp` both move from `Effect.acquireRelease(Bun.spawn(...))`
  to `appProc.spawn(ChildProcess.make(...))`. The spawner's built-in
  acquireRelease finalizer handles SIGTERM on scope close — no manual
  wiring needed.

- `handle.stdout` / `handle.stderr` are already Effect Streams, so the
  `fromBunStream` helper is gone (Stream.fromReadableStream + the
  per-pipe error-tag boilerplate it wrapped).

- acp's stdin moves from imperative `proc.stdin.write` + `proc.stdin.end`
  to a Queue<Uint8Array> fed into the spawner's stdin Sink via
  Stream.fromQueue. `send` is `Queue.offer`, `close` is `Queue.shutdown` —
  shutdown propagates as stdin EOF, which is ACP's graceful-exit signal.

- ServeHandle/AcpHandle public shape: `kill`/`close` become
  Effect<void> and `exited` becomes Effect<number> (was () => void and
  Promise<number>). The platform error that cross-spawn-spawner raises
  on signal-kill is collapsed to exit code -1 so `exited` stays a clean
  Effect<number> — matches the test contract (just needs proof of exit).

Two consuming tests updated to yield the Effect instead of awaiting
the Promise.
2026-05-19 16:19:04 -04:00
..
acp refactor(test/cli): migrate serve/acp builders to AppProcess.spawn 2026-05-19 16:19:04 -04:00
cmd/tui fix(tui): dedupe consecutive prompt history entries (#27816) 2026-05-16 02:36:35 +00:00
help refactor(test/cli): migrate harness short-lived path to AppProcess + FileSystem (#28366) 2026-05-19 16:18:19 -04:00
run test(opencode/run): skip Windows-only scrollback replay failure (#28261) 2026-05-19 11:24:23 -04:00
serve refactor(test/cli): migrate serve/acp builders to AppProcess.spawn 2026-05-19 16:19:04 -04:00
smokes test(cli): tier-A read-only command smoke tests (#28274) 2026-05-19 11:35:48 -04:00
tui use keymap state for layer visibility (#26246) 2026-05-19 17:07:26 +02:00
account.test.ts chore: generate 2026-03-23 17:12:55 +00:00
effect-cmd-instance-als.test.ts refactor(instance): remove legacy runtime fallback (#27757) 2026-05-15 23:05:44 +05:30
error.test.ts refactor(provider): type init errors (#27484) 2026-05-14 14:48:58 +05:30
github-action.test.ts Source HTTP API ID path patterns (#26623) 2026-05-09 22:58:47 -04:00
github-remote.test.ts feat(core): add scout agent for repo research (#24149) 2026-05-08 20:20:08 +00:00
import.test.ts chore: generate 2026-03-10 16:56:30 +00:00
plugin-auth-picker.test.ts core: make account login upgrades safe while adding multi-account workspace auth (#15487) 2026-03-10 12:53:47 -04:00