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
acp
agent
auth
background
bus
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
file
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
git
ide
image
installation
lib test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
lsp
mcp
patch
permission
plugin handle permanent file plugin errors (#27344) 2026-05-20 18:47:30 +02:00
project
provider test: drop AppRuntime usage from tests 2026-05-20 20:50:32 -04:00
pty
question
reference
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
shell
skill
snapshot Skip snapshot seed file commits (#28405) 2026-05-19 17:45:55 -04:00
storage
sync
tool chore: generate 2026-05-19 15:11:40 +00:00
util
v2
AGENTS.md
EFFECT_TEST_MIGRATION.md
permission-task.test.ts
preload.ts