cloudaxe-opencode/packages/opencode/test
Kit Langton ddbd119dcb test: drop AppRuntime usage from tests
Removes all direct AppRuntime usage from packages/opencode/test —
`grep -r AppRuntime packages/opencode/test` now returns nothing.

Two patterns are applied:

1. Event tests rewritten in the httpapi-cors.test.ts style. The two
   /event SSE tests now serve HttpApiApp.routes on
   NodeHttpServer.layerTest and hit them via HttpClient. Pub/sub
   identity with the in-process routes is preserved via a new opt-in
   `testEffectShared` (in test/lib/effect.ts) that builds the test
   layer through the shared process-wide memoMap so Bus.defaultLayer
   resolves to the same Bus.Service the routes subscribed to.

   The SSE reader helpers move to test/lib/sse.ts and use HttpClient +
   Effect.Stream + Queue<SseEvent>.

   The D7 diagnostic case is removed: the AppRuntime-vs-test-runtime
   distinction it diagnosed no longer exists.

2. Surgical swap in the remaining four files
   (provider/{amazon-bedrock,provider}, session/llm,
   control-plane/workspace). Each `AppRuntime.runPromise(...)` becomes a
   module-level `ManagedRuntime.make(Service.defaultLayer, { memoMap })`.
   The shared memoMap preserves service identity, so behavior is
   unchanged.

Tests: event (9/9), amazon-bedrock (19/19), provider (84/84),
workspace (35/35); 147 pass across the 5 affected files. The 3
pre-existing failures in session/llm.test.ts are independent of this
change (verified by stashing the diff).
2026-05-20 20:50:32 -04:00
..
account refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
acp chore: generate 2026-05-14 23:34:42 +00:00
agent refactor(flags): route scout through runtime flags (#27318) 2026-05-13 17:07:53 +05:30
auth core: move cross-spawn-spawner to root and remove unused types 2026-04-25 14:30:16 -04:00
background feat(core): add background job service (#27033) 2026-05-12 15:22:38 +05:30
bus fix(bus): acquire PubSub subscription eagerly to close /event race (#27959) 2026-05-18 11:38:05 -04:00
cli fix(tui): gate Zed context on terminal env (#28517) 2026-05-20 16:52:33 -04:00
config fix(config): resolve agent/command names from relative paths (#28359) 2026-05-19 20:48:32 +00:00
control-plane test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
effect chore: generate 2026-05-18 18:42:55 +00:00
fake test(agent): isolate plugin agent regression (#26948) 2026-05-11 19:38:54 -04:00
file Stabilize watcher test readiness (#28194) 2026-05-18 12:51:46 -04:00
filesystem
fixture use keymap state for layer visibility (#26246) 2026-05-19 17:07:26 +02:00
fixtures/recordings/session chore: generate 2026-05-19 12:21:56 +00:00
format test(format): remove formatter check sleeps (#27407) 2026-05-13 21:02:34 -04:00
git test(git): migrate git tests to Effect runner (#27121) 2026-05-12 18:50:07 +00:00
ide
image fix: image resizer wasm loading, reenable image resizing (#26805) 2026-05-13 23:06:07 -05:00
installation effect(installation): migrate to AppProcess.run (#27188) 2026-05-13 11:54:29 -04:00
lib test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
lsp fix(lsp): preserve instance ref for update events (#28016) 2026-05-17 16:37:00 +05:30
mcp test(lib): promote pollWithTimeout/awaitWithTimeout helpers (#27626) 2026-05-14 23:45:32 +00:00
patch effect(patch,tool): migrate patch/index and tool/read to AppFileSystem (#27155) 2026-05-13 20:32:19 -04:00
permission chore: generate 2026-05-13 02:08:16 +00:00
plugin handle permanent file plugin errors (#27344) 2026-05-20 18:47:30 +02:00
project refactor(instance): remove legacy runtime fallback (#27757) 2026-05-15 23:05:44 +05:30
provider test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
pty test(pty): migrate output isolation to Effect runner (#27235) 2026-05-13 03:25:52 +00:00
question refactor(instance): remove legacy runtime fallback (#27757) 2026-05-15 23:05:44 +05:30
reference refactor(repository): add cache service (#28184) 2026-05-18 21:25:38 +05:30
server test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
session test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
share refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
shell refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
skill refactor(flags): migrate external skills flag (#27685) 2026-05-15 13:24:56 +05:30
snapshot Skip snapshot seed file commits (#28405) 2026-05-19 17:45:55 -04:00
storage refactor(flags): migrate skip migrations flag (#27705) 2026-05-15 14:54:29 +05:30
sync refactor(sync): publish via EffectBridge.fork for codebase consistency (#28187) 2026-05-18 13:30:41 -04:00
tool chore: generate 2026-05-19 15:11:40 +00:00
util refactor(repository): clarify reference domain (#28182) 2026-05-18 21:04:44 +05:30
v2 Add Effect-native core event system (#27415) 2026-05-15 00:50:23 +00:00
AGENTS.md refactor(instance): remove legacy runtime fallback (#27757) 2026-05-15 23:05:44 +05:30
EFFECT_TEST_MIGRATION.md refactor(instance): retire WithInstance adapter (#27782) 2026-05-16 01:30:07 +05:30
permission-task.test.ts test: migrate permission task config tests (#27343) 2026-05-13 14:56:26 +00:00
preload.ts refactor(flags): route session workspaces through runtime flags (#27335) 2026-05-13 20:14:40 +05:30