Skip to content
Source
Sign inSign up
pingdotgg/t3code

Increase Effect RPC ping timeout for large snapshots #3817

ClosedPearcekieser(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/3817/headopened View on GitHub

What Changed

Increases the patched Effect RPC pinger delay from 5 seconds to 60 seconds.

This updates patches/effect@4.0.0-beta.78.patch so the generated RPC client waits longer before declaring the connection unhealthy due to a missed Pong. It also refreshes pnpm-lock.yaml so the lockfile points at the new pnpm patch hash for the modified Effect patch.

Replaces #2885 from the org-owned fork with the same change pushed from my personal fork, so upstream maintainers can edit the branch normally.

Why

Large thread snapshots can occupy the WebSocket long enough that the Effect RPC Pong is queued behind snapshot chunks. On slow remote connections, the current 5 second heartbeat window can expire before the Pong reaches the client, causing a reconnect. The reconnect then requests the same large snapshot again, which can repeat the failure loop.

A 60 second window gives large snapshot sends more time to drain before the client treats the connection as dead.

This is a small mitigation for #2761. It does not solve the deeper issue that large snapshots and control/heartbeat messages share the same WebSocket queue; longer term, snapshots likely need pagination, truncation, backpressure, or control-message prioritization.

Verification

  • CI=true pnpm install --lockfile-only --frozen-lockfile --ignore-scripts

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • UI changes are not applicable

Note

Medium Risk Changes global RPC liveness timing for all clients using the patched Effect build; a dead connection may take up to ~60s to detect instead of ~5s, while reducing false timeouts on slow links.

Overview Extends the patched Effect RPC client heartbeat so a missing Pong is not treated as a dead connection as quickly during long WebSocket transfers (e.g. large thread snapshots).

In patches/effect@4.0.0-beta.78.patch, the makePinger loop delay changes from 5 seconds to 60 seconds between ping cycles. The pinger already runs optional hooks.onPing / hooks.onPong before writes; this PR only tightens that wiring in the patch hunk shown in the diff (same behavior, longer window).

pnpm-lock.yaml is refreshed so every workspace dependency on effect@4.0.0-beta.78 uses the new pnpm patch hash for the updated patch file.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 2825718f3bfd49bf709b76103cba9247dc16d904. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Increase Effect RPC ping interval to 60 seconds for large snapshot support

  • Updates patches/effect@4.0.0-beta.78.patch to change the protocol worker ping interval from 5 seconds to 60 seconds.
  • Adds an hooks.onPing call (when provided) before each ping is sent, allowing pre-ping side effects.
  • Behavioral Change: ping frequency drops from every 5s to every 60s, which may affect connection keepalive behavior in environments with short idle timeouts.
Macroscope summarized 2825718.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: af1bb5ff-9410-4b44-9a15-9346f7edd263

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

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

      Approvability

      Verdict: Approved

      Simple timeout configuration change - increases Effect RPC ping delay from 5 to 60 seconds. The bulk of the diff is mechanical lockfile hash updates from the patch change.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      Closing this PR after an automated pass over open pull requests. Patches an old Effect beta version that is no longer used. Current heartbeat handling already improved.

Sign in to join this conversation.