Skip to content
Source
Sign inSign up
pingdotgg/t3code

chore(deps): upgrade Effect to stable 4.0.0 #14914

Closedjuliusmarmingewants to merge 2 commits intomain fromt3code/effect-v4-stableopened View on GitHub

juliusmarmingecommented

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 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 flattened effect/<area> paths (httpapi becomes http-api).
  • effect/Encoding is replaced by effect/encoding/{Base64,Base64Url,Hex}.

Dependencies still on the release candidates

  • Alchemy 2.0.0-beta.80 and distilled 1.0.0-rc.13 use 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, and Schema.isStartsWith (renamed isStartingWith).
    • The statics helper assigned over a schema's make, which 4.0.0 caches as a non-configurable property. The patch defines the static make up front instead.
    • The patches can be dropped once OpenCode moves to stable Effect.
  • Drizzle 1.0.0-rc.5-ab785fc only references effect/unstable/sql/SqlError in its .d.ts files. Its runtime JS loads unchanged, so it needs no bump.

Behaviour changes from rc.116 to 4.0.0

  • Tracing: HttpRouter.serve now 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 new http.test.ts test fails without it.
    • The same change makes services from layers around serve win over the app's own. The static-file test now provides its tracked FileSystem between serve and NodeHttpServer.layerTest.
  • Closing scopes: Scope.close now 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.ndJsonRpc now 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.partition returns successes first.
    • Stream.scan takes a lazy initial state.
    • SchemaGetter.onSome and .compose are replaced.
    • Schema.brand needs a single concrete brand key.
    • Effect.orElseSucceed now 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 getSetCookie guard carry over. A ping timeout now fails with upstream's SocketReadError instead of SocketOpenError.
  • @effect/vitest: still the vite-plus/test import swap. pnpm rejects catalog: in the @effect/vitest package extension once it re-resolves, so vite-plus is pinned there literally.

Verification

  • tsc --noEmit is 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: /var is a symlink to /private/var there. CI runs on Linux.
  • The relay's alchemy/Cloudflare and @opencode/client/effect both import at runtime on 4.0.0.

🤖 Generated with Claude Code


Devin Review
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. juliusmarminge added labelsmacroscope-review

    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire4.9 KiB4.9 KiB−40 B (−0.8%)6.8 KiB✅
      CodexThread snapshot wire3.7 KiB3.7 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.1 KiB−40 B (−3.3%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.4 KiB20.4 KiB−41 B (−0.2%)29.3 KiB✅
      CodexLive turn messages21−1 (−50.0%)8✅
      ClaudeTotal thread wire4.9 KiB4.9 KiB+22 B (+0.4%)6.8 KiB✅
      ClaudeThread snapshot wire3.7 KiB3.7 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB+22 B (+1.9%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded20.7 KiB20.8 KiB+41 B (+0.2%)29.3 KiB✅
      ClaudeLive turn messages12+1 (+100.0%)8✅

      Baseline: ca7df39 · PR result: c57b5b8 · Source CI: success

      Scenario 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.

      • Codex decoded thread snapshot: 106.1 KiB
      • Claude decoded thread snapshot: 106.4 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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.
      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. juliusmarminge closed this

Sign in to join this conversation.