cloudaxe-opencode/packages/opencode/script
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
..
bench-test-suite.ts Speed up targeted opencode tests 2026-05-18 16:18:29 +00:00
build-node.ts Load models.dev snapshot from build global (#28077) 2026-05-17 21:59:44 -04:00
build.ts Load models.dev snapshot from build global (#28077) 2026-05-17 21:59:44 -04:00
check-migrations.ts sqlite again (#10597) 2026-02-14 04:19:02 +00:00
fix-node-pty.ts refactor(server): replace Bun serve with Hono node adapters (#18335) 2026-04-06 13:24:55 -04:00
generate.ts Load models.dev snapshot from build global (#28077) 2026-05-17 21:59:44 -04:00
httpapi-exercise.ts refactor(server): split HttpApi exercise harness (#26385) 2026-05-08 17:58:14 +00:00
postinstall.mjs Fix npm CLI binary installation (#27801) 2026-05-15 18:43:37 -04:00
prebuild-test-cli.ts refactor(test/cli): simplify pass on tier-A + prebuild 2026-05-19 11:36:15 -04:00
profile-test-files.ts Speed up targeted opencode tests 2026-05-18 16:18:29 +00:00
publish.ts core: clarify postinstall error message when binary is missing 2026-05-15 23:12:00 -04:00
run-workspace-server chore: generate 2026-04-20 18:29:48 +00:00
schema.ts Validate TUI config with Effect Schema (#26952) 2026-05-11 23:51:45 +00:00
time.ts move useful scripts to script folder 2026-04-16 10:09:14 -04:00
trace-imports.ts move useful scripts to script folder 2026-04-16 10:09:14 -04:00