opencode/packages/core/test
Filip Hejmowski 9e8ed6f33e fix(core): speed up location boot and VCS routes on Windows
Plugin activation awaits the VCS branch refresh and the location watcher's
repository probe, so every Location boot waited on three to four sequential
git rounds before the agent, model, provider and integration lists answered.
Each round costs ~40ms on Windows.

- Read the remote list with origin's HEAD in one round, and local branches
  with init.defaultBranch in one more only when no remote HEAD names the
  default branch.
- Cache repository discovery by the .git metadata fingerprint, as
  Project.resolve already does.
- vcs.status no longer checks HEAD before listing; vcs.diff fetches the
  batched patch with the change list and reads HEAD with the default branch.
- Look up commands on Windows with one stat per PATHEXT extension instead of
  one per case, without throwing on every miss.

Adds packages/server/script/benchmark-server.ts, which boots
`opencode serve` from any checkout and replays a client opening a location.
2026-10-30 11:20:24 +01:00
..
codemode fix(core): tell Code Mode models built-in tools stay top-level (#57627) 2026-10-28 20:51:18 -05:00
config feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
effect fix(cli): bound server shutdown with a 10 s deadline (#58817) 2026-10-25 07:47:11 -07:00
filesystem feat(core): watch files open in the side panel (#59081) 2026-10-25 22:54:00 +00:00
fixture fix(core): remove a session's terminals when it is deleted (#60322) 2026-10-29 16:55:30 -04:00
fixtures/recordings/session-runner feat(core): let subagents pick a model and expose models tool (#49194) 2026-09-16 01:16:55 -05:00
github-copilot fix(core): accept interleaved Copilot reasoning_opaque values (#54201) 2026-10-09 16:45:57 -05:00
instructions feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
lib feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
modal refactor(core): refactor model resolving logic, fix missing variant logic (#48943) 2026-09-14 18:29:34 -05:00
plugin feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
process chore(ci): speed up and stabilize the test workflow (#55866) 2026-10-16 00:35:49 +02:00
pty feat(server): add client MCP websocket endpoint (experimental) (#57505) 2026-10-22 15:56:44 -04:00
shell-scan fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
skill fix(core): send only changed entries in instruction updates (#57626) 2026-10-20 23:09:10 -05:00
util fix(core): speed up location boot and VCS routes on Windows 2026-10-30 11:20:24 +01:00
agent.test.ts feat(core): stop asking for external directory access by default (#53585) 2026-10-06 15:52:23 -04:00
aisdk-native.test.ts chore(ai): drop five unused legacy provider entrypoint aliases (#59506) 2026-10-27 11:45:49 -05:00
aisdk.test.ts refactor(ai): replace wildcard exports with an explicit public API (#59183) 2026-10-26 09:37:24 -05:00
app.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
boot-work.test.ts fix(core): speed up location boot and VCS routes on Windows 2026-10-30 11:20:24 +01:00
browser-idle.test.ts fix(core): keep locations with running sessions or background jobs (#57416) 2026-10-20 11:36:08 -04:00
bus-session-routing.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
bus-unpersisted.test.ts perf(core): skip encoding durable event payloads that aren't persisted (#58923) 2026-10-25 06:16:09 -07:00
bus.test.ts refactor: v2.1 minor breaking changes (#57260) 2026-10-20 00:42:13 -05:00
catalog.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
codemode.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
command.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
credential-lock.test.ts fix(core): coordinate credential refreshes across locations and processes (#54023) 2026-10-26 01:09:42 -05:00
credential.test.ts refactor: v2.1 minor breaking changes (#57260) 2026-10-20 00:42:13 -05:00
database-drizzle.test.ts chore(core): redact params in database query errors (#55621) 2026-10-15 01:04:07 -05:00
database-migration.test.ts chore: upgrade effect to 4.0.6 (#59630) 2026-10-29 11:06:23 +01:00
database.test.ts fix(core): restrict database files to their owner (#52150) 2026-09-29 14:18:40 -05:00
effect-app-node-platform.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
effect-simplification-types.test.ts chore: enforce effect simplifications (#43979) 2026-08-21 19:48:27 +00:00
environment.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
event-logger.test.ts refactor(core): split provider and model registries (#48901) 2026-09-14 10:34:11 -04:00
file-access-path.test.ts refactor(core): folder-permission checks use the project's own file system (#59089) 2026-10-26 10:23:18 -07:00
file-access.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
file-mutation.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
form.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
formatter.test.ts fix(core): merge formatter config across files (#52739) 2026-10-02 17:49:12 +05:30
generate.test.ts fix(core): stop merging credential metadata into model settings (#60057) 2026-10-28 19:41:11 -05:00
git.test.ts fix(core): keep snapshots working in repos with a split index (#59417) 2026-10-27 15:19:17 -05:00
image-photon.test.ts perf(core): resize images in a worker and release photon memory when idle (#58820) 2026-10-25 22:28:48 -07:00
instance-vanilla.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
instruction-discovery.test.ts fix(core): match absolute instruction globs across directories (#58749) 2026-10-24 12:42:49 -05:00
instruction-state.test.ts feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
integration-refresh.test.ts fix(core): coordinate credential refreshes across locations and processes (#54023) 2026-10-26 01:09:42 -05:00
integration.test.ts fix(core): coordinate credential refreshes across locations and processes (#54023) 2026-10-26 01:09:42 -05:00
job.test.ts refactor(core): require job ids from their subject (#52806) 2026-10-02 18:27:13 +00:00
kv.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
location-activity.test.ts fix(core): canonicalize location in activity tracking (#59087) 2026-10-25 23:03:25 +00:00
location-filesystem.test.ts feat(session-ui): deterministic timeline file link detection and resolution (#53641) 2026-10-09 02:50:00 +00:00
location-layer.test.ts fix(core): close Locations in parallel on shutdown (#59326) 2026-10-26 11:59:58 -05:00
location.test.ts feat(core): archive projects whose directories are gone (#54354) 2026-10-10 21:11:05 -04:00
logging.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
mcp-attach.test.ts feat(core): add MCP transport over incoming client sockets (#57502) 2026-10-22 14:58:39 -04:00
mcp-import-boundary.test.ts perf(core): load MCP client lazily (#42468) 2026-08-13 22:48:09 -04:00
mcp-instructions.test.ts fix(core): expose code mode tools directly when execute is denied (#59315) 2026-10-26 10:48:31 -05:00
mcp-oauth.test.ts fix(core): coordinate credential refreshes across locations and processes (#54023) 2026-10-26 01:09:42 -05:00
mcp-socket-client.test.ts feat(core): add MCP transport over incoming client sockets (#57502) 2026-10-22 14:58:39 -04:00
mcp.test.ts fix(core): show Code Mode programs the same failure text as direct calls (#60109) 2026-10-29 21:38:49 -05:00
mime.test.ts fix(core): tell HEIC, QuickTime and M4A apart from MP4 (#58887) 2026-10-26 00:04:36 -05:00
model-free.test.ts feat(core): add OPENCODE_DISABLE_FREE_MODELS to hide free models (#57478) 2026-10-20 22:18:42 -04:00
model-plugins.test.ts refactor(core): split provider and model registries (#48901) 2026-09-14 10:34:11 -04:00
model-resolver.test.ts fix(core): stop merging credential metadata into model settings (#60057) 2026-10-28 19:41:11 -05:00
model.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
models.test.ts fix(core): skip image models without an image package (#59926) 2026-10-28 10:16:34 -05:00
network-guard.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
npm-config.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
npm.test.ts chore: enable noUnusedLocals in ai and core (#52858) 2026-10-02 22:45:27 +00:00
oauth-page.test.ts feat(oauth): unify OAuth callback browser pages (#34025) 2026-06-26 00:36:40 -05:00
patch.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
permission.test.ts fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
persistent-pty-daemon.test.ts fix(core): remove a session's terminals when it is deleted (#60322) 2026-10-29 16:55:30 -04:00
persistent-pty-session.test.ts fix(core): remove a session's terminals when it is deleted (#60322) 2026-10-29 16:55:30 -04:00
plugin-failure.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
plugin.test.ts feat(plugin): add OpenCode Desktop GUI plugins (#55246) 2026-10-27 10:54:50 +10:00
preload.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
preload.ts test(core): disable npm audits in the test preload (#47170) 2026-09-03 19:52:18 -05:00
project-icon.test.ts feat(core): show detected project icons (#59093) 2026-10-25 23:18:45 +00:00
project.test.ts perf(core): cache git discovery in Project.resolve by metadata fingerprint (#58616) 2026-10-24 14:34:07 -07:00
provider.test.ts chore(ai): drop five unused legacy provider entrypoint aliases (#59506) 2026-10-27 11:45:49 -05:00
reference-instructions.test.ts fix(core): send only changed entries in instruction updates (#57626) 2026-10-20 23:09:10 -05:00
reference.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
repository-cache.test.ts chore(ci): speed up and stabilize the test workflow (#55866) 2026-10-16 00:35:49 +02:00
repository.test.ts fix(core): reject relative path segments in repository hosts (#51577) 2026-09-28 10:14:35 +05:30
ripgrep.test.ts fix(core): verify SHA-256 of downloaded ripgrep before running it (#59350) 2026-10-26 13:44:40 -05:00
rpc-handler-errors.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
schedule.test.ts fix(core): fail schedule creation when a code check throws and pause invalid checks immediately (#60349) 2026-10-29 12:54:31 -07:00
session-activation.test.ts chore(ci): speed up and stabilize the test workflow (#55866) 2026-10-16 00:35:49 +02:00
session-archive.test.ts feat(app): add an experimental session inbox to the sidebar (#55647) 2026-10-19 14:37:57 +08:00
session-checkpoint-transport.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-compact.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-compaction-transport.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-compaction.test.ts feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
session-create.test.ts feat(core): record when a session's latest execution started (#59910) 2026-10-29 07:45:09 +00:00
session-diff.test.ts fix(core): use the index when loading turn diffs (#59088) 2026-10-25 23:03:52 +00:00
session-environment.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
session-error.test.ts fix: show the Go usage limit's reset time, Go page link and a composer tray (#60284) 2026-10-29 12:02:57 -05:00
session-execution.test.ts feat(core): turn experimental_image_generate on by default (#60258) 2026-10-29 10:51:02 -05:00
session-generate.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-instructions.test.ts perf(session): load a step's history once (#59091) 2026-10-25 22:27:39 -07:00
session-list.test.ts refactor(core): page session lists in core (#56243) 2026-10-16 23:11:22 -05:00
session-log.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
session-model-request-hooks.test.ts fix(core): send unchanged hooked requests without copying the body (#59097) 2026-10-25 23:34:34 +00:00
session-model-request.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-model-transport-live.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-model-transport.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-move.test.ts fix(core): treat unreadable config file references as empty (#55959) 2026-10-16 01:12:37 -05:00
session-native-compaction.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-native.test.ts feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
session-owned.test.ts feat(server): add experimental GET /api/experimental/media/:hash and opt-in experimental-media-uri capability (#59103) 2026-10-25 21:33:53 -07:00
session-projector.test.ts feat(core): record when a session's latest execution started (#59910) 2026-10-29 07:45:09 +00:00
session-prompt.test.ts fix(tui): preserve captured attachments and source paths (#60222) 2026-10-29 12:04:39 -05:00
session-remove.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
session-revert.test.ts fix(tui): include provider latency in TPS 2026-09-17 10:40:12 -04:00
session-run-coordinator.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
session-runner-message.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-runner-recorded.test.ts feat(core): append model identity to system prompts via plugin (#49129) 2026-09-15 11:46:07 -05:00
session-runner-retry.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-runner-tool-events.test.ts chore: merge dev into beta 2026-10-26 08:34:06 +10:00
session-runner.test.ts feat(core): add Claude Agent provider (#58782) 2026-10-30 06:48:35 +00:00
session-shell.test.ts chore(ci): speed up and stabilize the test workflow (#55866) 2026-10-16 00:35:49 +02:00
session-skill.test.ts feat(core): integration.connect and integration.use policies (#60315) 2026-10-29 14:24:22 -04:00
session-sql.types.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
session-stats.test.ts fix(core): match versioned usage event type in stats (#48997) 2026-09-14 20:30:13 +05:30
session-step.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-store.test.ts feat(core): add the session_part table and read history from it (#58915) 2026-10-28 21:30:03 -07:00
session-system-prompt.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
session-title.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-tool-progress.test.ts fix(tui): include provider latency in TPS 2026-09-17 10:40:12 -04:00
session-usage.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
session-view.test.ts fix: surface session execution errors in desktop and TUI timelines (#53826) 2026-10-09 14:14:44 +10:00
session-wait.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
shared-schema.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
shell-cleanup.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
shell-parse-compatibility.test.ts fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
shell-parse-parity.test.ts fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
shell-parse-syntax.test.ts fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
shell-parse.test.ts fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
shell-retention.test.ts feat(sdk): seed host plugins before recovery and harden workerd defaults (#54219) 2026-10-09 17:07:51 -07:00
shell.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
skill-discovery.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
skill.test.ts feat(core): integration.connect and integration.use policies (#60315) 2026-10-29 14:24:22 -04:00
snapshot.test.ts test: fix Windows flakes in cli standalone, Storybook and snapshot tests (#56181) 2026-10-16 18:24:02 +02:00
sqlite-bundle.test.ts fix(core): default #sqlite resolution to the node driver (#41834) 2026-08-11 17:50:09 -04:00
sqlite-workerd.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
state-group.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
state-replay.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
state.test.ts fix(core): publish catalog updates only when they change (#59084) 2026-10-25 22:58:29 +00:00
subagent-lifetime.test.ts refactor(ai): make Promise the root entry and move Effect to @opencode/ai/effect (#58847) 2026-10-24 22:18:23 -05:00
tool-edit.test.ts fix(core): preserve mixed line endings in edit tool (#53166) 2026-10-12 16:22:58 +02:00
tool-execute.test.ts fix(core): apply webfetch permissions to Code Mode fetch (#59954) 2026-10-30 01:16:57 -05:00
tool-html-markdown-budget.test.ts fix(core): terminate exhausted Markdown code budgets (#47408) 2026-09-09 09:15:11 -04:00
tool-image-generate.test.ts feat(core): turn experimental_image_generate on by default (#60258) 2026-10-29 10:51:02 -05:00
tool-opencode.test.ts fix(core): show Code Mode programs the same failure text as direct calls (#60109) 2026-10-29 21:38:49 -05:00
tool-output.test.ts refactor(core): name tool output files in ToolOutput (#52808) 2026-10-02 18:24:57 +00:00
tool-patch.test.ts fix(core): stop GPT patch edits from deleting a file moved onto itself (#59197) 2026-10-26 10:09:29 -07:00
tool-question.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
tool-read-filesystem.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
tool-read.test.ts fix(core): store opaque screenshots as JPEG before PNG (#56990) 2026-10-23 14:43:06 -07:00
tool-registry.test.ts fix(core): apply webfetch permissions to Code Mode fetch (#59954) 2026-10-30 01:16:57 -05:00
tool-schedule.test.ts fix(core): apply webfetch permissions to Code Mode fetch (#59954) 2026-10-30 01:16:57 -05:00
tool-schema.test.ts refactor(ai): replace wildcard exports with an explicit public API (#59183) 2026-10-26 09:37:24 -05:00
tool-search.test.ts fix(core): exclude hidden glob matches before limiting results 2026-09-09 09:41:07 -04:00
tool-shell.test.ts fix(core): check redirects, PowerShell method calls, and dynamic directory changes (#60376) 2026-10-29 15:29:19 -07:00
tool-skill.test.ts feat(core): integration.connect and integration.use policies (#60315) 2026-10-29 14:24:22 -04:00
tool-subagent.test.ts feat(core): add image_generate tool (#59939) 2026-10-28 20:35:16 -05:00
tool-todo.test.ts fix(core): apply webfetch permissions to Code Mode fetch (#59954) 2026-10-30 01:16:57 -05:00
tool-webfetch.test.ts fix(core): apply webfetch URL rules to redirect targets (#59748) 2026-10-27 16:57:53 -05:00
tool-websearch.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
tool-write.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
usage-limits.test.ts feat(core): read OpenCode Console usage limits and classify budget refusals (#58694) 2026-10-24 11:13:12 -05:00
v1-migration.test.ts feat(core): record when a session's latest execution started (#59910) 2026-10-29 07:45:09 +00:00
variant.test.ts feat(ai): add image and decision entrypoints for catalog providers (#59380) 2026-10-26 16:50:56 -05:00
vcs-hg.test.ts test(core): expect the vcs provider in info results (#49264) 2026-09-15 23:01:16 -04:00
vcs.test.ts fix(core): drop bare remote names from branch lists and search remote branches (#58597) 2026-10-25 22:39:51 -07:00
voice.test.ts feat(core): offer GPT-Live through an OpenCode Console connection without an OpenAI key (#58567) 2026-10-23 22:29:46 -05:00
websearch.test.ts refactor(packages): migrate to the opencode npm scope (#47852) 2026-09-07 17:19:33 -04:00
wellknown.test.ts fix(core): broadcast wellknown updates globally and bound HTTP timeouts (#53821) 2026-10-09 15:17:26 -07:00
workspace.test.ts chore: upgrade Effect to rc.118 (#50231) 2026-10-09 01:36:06 -07:00
worktree.test.ts refactor(core): tighten worktree strategy and pty schemas and decode overlay once (#57950) 2026-10-21 20:57:46 -05:00