chore(deps): upgrade Effect to stable 4.0.0 #14914
main fromt3code/effect-v4-stable·opened View on GitHubEffect 4.0.0 is out as the first stable v4 release. Main is on 4.0.0-rc.115, which is several breaking releases behind. Between the two, Effect removed the effect/unstable/* export paths and the effect/Encoding module, and changed several APIs we rely on. This reopens #14563 against main after the new orchestrator merged (#2829).
Changes#
Imports#
- All 785 files that imported
effect/unstable/*now use the flattenedeffect/<area>paths (httpapibecomeshttp-api). effect/Encodingis replaced byeffect/encoding/{Base64,Base64Url,Hex}.
Dependencies still on the release candidates#
- Alchemy
2.0.0-beta.80and distilled1.0.0-rc.13use the 4.0.0 module paths, so the relay loads again. - OpenCode 2 (
@opencode/client,protocol,schema):- Bumped from 2.0.18 to 2.0.22. Every release through today still targets Effect rc.112, so all three are patched.
- The patches rewrite the removed import paths,
Encoding, andSchema.isStartsWith(renamedisStartingWith). - The
staticshelper assigned over a schema'smake, which 4.0.0 caches as a non-configurable property. The patch defines the staticmakeup front instead. - The patches can be dropped once OpenCode moves to stable Effect.
- Drizzle
1.0.0-rc.5-ab785fconly referenceseffect/unstable/sql/SqlErrorin its.d.tsfiles. Its runtime JS loads unchanged, so it needs no bump.
Behaviour changes from rc.116 to 4.0.0#
- Tracing:
HttpRouter.servenow builds its routes in a private layer cache, so the "don't trace the browser trace proxy" setting stopped applying. It is now provided to the served layer, and a newhttp.test.tstest fails without it.- The same change makes services from layers around
servewin over the app's own. The static-file test now provides its trackedFileSystembetweenserveandNodeHttpServer.layerTest.
- The same change makes services from layers around
- Closing scopes:
Scope.closenow only accepts a closeable scope.- SSH tunnels take their entry scope explicitly.
- The ACP and Antigravity runtimes close a child of the caller's scope.
- ACP malformed lines:
RpcSerialization.ndJsonRpcnow silently skips lines that aren't valid JSON. effect-acp decodes each line with the strict codec so a malformed agent line still ends the session; the existing protocol tests failed until this was fixed. - Smaller API changes:
Effect.partitionreturns successes first.Stream.scantakes a lazy initial state.SchemaGetter.onSomeand.composeare replaced.Schema.brandneeds a single concrete brand key.Effect.orElseSucceednow passes the error to its callback.
- One OpenCode adapter test read turn results from two consumers of the same queue. Effect's queue now hands each item to only one of them, so the test hung. It now waits on the single event drain it already forks.
Patches#
effect:- The MCP DELETE session route is re-ported to 4.0.0's internal session store and now lives in the HTTP protocol layer.
- The RpcClient hooks, the three-missed-pong tolerance and the
getSetCookieguard carry over. A ping timeout now fails with upstream'sSocketReadErrorinstead ofSocketOpenError.
@effect/vitest: still thevite-plus/testimport swap. pnpm rejectscatalog:in the@effect/vitestpackage extension once it re-resolves, sovite-plusis pinned there literally.
Verification#
tsc --noEmitis clean for every package: server, web, desktop, mobile, contracts, shared, client-runtime, ssh, tailscale, effect-acp, effect-codex-app-server, scripts, oxlint-plugin-t3code and relay.- Focused tests pass: 1,411 across
http.test.ts, MCP, RPC session, effect-acp, the codex app server, contracts, ACP runtime, OpenCode 2 client/server/adapter, the Grok, ACP and Antigravity v2 adapters, SSH, replay markers and schema helpers.- Two Antigravity client-file tests fail on macOS on unmodified main too:
/varis a symlink to/private/varthere. CI runs on Linux.
- Two Antigravity client-file tests fail on macOS on unmodified main too:
- The relay's
alchemy/Cloudflareand@opencode/client/effectboth import at runtime on 4.0.0.
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This upgrade spans 822 files and includes production runtime changes beyond import renames, including HTTP tracing, process-scope lifetimes, ACP parsing, patched dependency behavior, and authentication replay-marker handling. Changes under the server auth directory and the breadth of runtime effects require human review.
Notes:
- No code objects were reviewed. Approvability was decided on eligibility alone.
juliusmarminge closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
ca7df39· PR result:c57b5b8· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.