cloudaxe-opencode/packages/opencode/test/lib
Kit Langton 5acc917591 refactor(test/cli): simplify pass on tier-A + prebuild
Applies findings from the third simplify pass:

1. \`cliArgv\` is a module-level const, not a function — prebuiltCli is
   read once at module init and never mutated, so the per-spawn function
   allocation was pure overhead.

2. Help-snapshot failures surface via \`Effect.fail\` instead of \`throw\`,
   symmetric with the \`Effect.fail\` already inside the partition above.
   Keeps the failure typed in the Effect channel rather than as a defect.

3. \`prebuild-test-cli.ts\` skips the build when the binary is already
   newer than every file in src/ — saves the 2.8s rebuild cost on every
   subsequent invocation. Pass --force to bypass.

4. \`prebuild-test-cli.ts\` verifies the built binary is executable before
   symlinking — catches a silently-failed build leaving stale output
   instead of letting tests fail with confusing exec errors later.

Verified: 331/331 CLI tests pass; typecheck clean; skip-if-fresh + --force
behave as documented.
2026-05-19 11:36:15 -04:00
..
cli-process.ts refactor(test/cli): simplify pass on tier-A + prebuild 2026-05-19 11:36:15 -04:00
effect.ts test(lib): promote pollWithTimeout/awaitWithTimeout helpers (#27626) 2026-05-14 23:45:32 +00:00
filesystem.ts
llm-server.ts
snapshot.ts test(lib): extract snapshot normalizer utility for cross-OS stability (#28356) 2026-05-19 11:09:49 -04:00
test-provider.ts test(cli): subprocess integration test harness + regression suite for opencode run (#28230) 2026-05-18 18:32:20 -04:00
websocket.ts fix(core): reconnect editor context for session directory (#24984) 2026-04-29 15:11:44 -04:00