chore(deps): upgrade Effect to stable 4.0.0 - #14914
juliusmarminge wants to merge 2 commits into
Conversation
Effect 4.0.0 drops the `effect/unstable/*` export paths, so every import
moves to its flattened `effect/<area>` path (`httpapi` becomes `http-api`).
`effect/Encoding` is split into `effect/encoding/{Base64,Base64Url,Hex}`.
Dependencies that still targeted the release candidates:
- Alchemy 2.0.0-beta.80 and distilled 1.0.0-rc.13 ship the flattened layout.
- OpenCode 2 (@opencode/client, protocol, schema) is bumped to 2.0.22 and
patched: it still imports the removed paths, `Encoding` and
`Schema.isStartsWith`, and its `statics` helper assigned over a schema's
`make`, which 4.0.0 caches as a non-configurable property.
- Drizzle's Effect integration only references the old paths in .d.ts
files and loads unchanged.
Behavior changes picked up from rc.116 through 4.0.0:
- `HttpRouter.serve` builds the app in a private memo map, so the server's
`TracerDisabledWhen` predicate is now provided to the served layer, with a
test that fails without it. Services from layers around `serve` now win
over the app's own, so the static-file test provides its tracked
FileSystem between `serve` and `NodeHttpServer.layerTest`.
- `Scope.close` requires a closeable scope: SSH tunnels take their entry
scope explicitly, and the ACP and Antigravity runtimes close a child of
the caller's scope.
- `RpcSerialization.ndJsonRpc` skips lines that are not JSON, so effect-acp
decodes each frame with the strict codec to keep failing sessions on a
malformed agent line.
- `Effect.partition` returns successes first; `Stream.scan` takes a lazy
initial state; `SchemaGetter.onSome`/`.compose` are replaced; `Schema.brand`
requires a single concrete brand key.
- One OpenCode adapter test read turn terminals from two consumers of the
same queue; it now waits on the single drain it already forks.
The effect patch is re-ported: MCP DELETE now lives in the HTTP protocol
layer against the new stateful runtime, and the missed-pong tolerance and
RpcClient hooks keep upstream's `SocketReadError` ping-timeout reason.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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. |
ApprovabilityVerdict: 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:
You can add or adjust custom eligibility rules. Learn more. |
Effect 4.0.0 returns a declared MCP tool failure as `isError: true` with the encoded failure as JSON text, without `structuredContent`. The toolkit tests now read the failure payload from the text content. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Effect 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 theeffect/unstable/*export paths and theeffect/Encodingmodule, and changed several APIs we rely on. This reopens #14563 against main after the new orchestrator merged (#2829).Changes
Imports
effect/unstable/*now use the flattenedeffect/<area>paths (httpapibecomeshttp-api).effect/Encodingis replaced byeffect/encoding/{Base64,Base64Url,Hex}.Dependencies still on the release candidates
2.0.0-beta.80and distilled1.0.0-rc.13use the 4.0.0 module paths, so the relay loads again.@opencode/client,protocol,schema):Encoding, andSchema.isStartsWith(renamedisStartingWith).staticshelper assigned over a schema'smake, which 4.0.0 caches as a non-configurable property. The patch defines the staticmakeup front instead.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
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.servewin over the app's own. The static-file test now provides its trackedFileSystembetweenserveandNodeHttpServer.layerTest.Scope.closenow only accepts a closeable scope.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.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.Patches
effect: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.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./varis a symlink to/private/varthere. CI runs on Linux.alchemy/Cloudflareand@opencode/client/effectboth import at runtime on 4.0.0.🤖 Generated with Claude Code