Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client): a frozen host no longer shows a heartbeat as slow or blames your DNS #22212

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/22212/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

When a remote host got CPU-starved (leftbook at load 219 on 18 cores from a benchmark), its T3 server froze for 10 to 20s at a time. The only thing the user saw was a "Some requests are slow" toast for server.reportClientActivity · 33104658-322c-…. That is a background heartbeat nobody waits on, shown with an environment UUID. The disconnect reason was "leftbook stopped responding. Your DNS or firewall may be blocking T3 Connect.", even though the socket had been working for 90s.

Now:

  • The slow-request toast skips server.reportClientActivity and names the environment ("… · leftbook"), not its id.
  • When an open connection goes quiet, the reason reads "leftbook stopped responding for 15s. It may be overloaded, asleep, or off the network." The DNS/firewall hint stays only for sockets that never open.
  • The transport-error matcher still treats the new text as a connection error, so thread errors stay clean.

A follow-up stacked PR has the server report the real cause ("leftbook froze for 12s. Its CPU is overloaded").

Reviewed with sol-loop: 1 round with GPT-6.1 Sol. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

    1. Approvability

      Verdict: Approved at b17c252

      Macroscope's review found this PR approvable — This is a focused client diagnostics fix that suppresses misleading background-heartbeat warnings, uses environment labels, and distinguishes an unresponsive open connection from an initial network failure. Connection timing and transport behavior remain unchanged, and the affected paths have focused test coverage.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    2. Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Team
      • Run ID: 8e2bd474-7c19-48c7-bf86-4551c1b93232
      📥 Commits

      Reviewing files that changed from the base of the PR and between 72bdf1e658c6f875534b870fa02e38c5648ccec3 and b17c25207534d4564f955c652cd67d7e2704651f.

      📒 Files selected for processing: 10
      • apps/web/src/connection/platform.ts
      • apps/web/src/rpc/requestLatencyState.test.ts
      • apps/web/src/rpc/requestLatencyState.ts
      • packages/client-runtime/src/errors/network.ts
      • packages/client-runtime/src/errors/transport.test.ts
      • packages/client-runtime/src/errors/transport.ts
      • packages/client-runtime/src/rpc/client.test.ts
      • packages/client-runtime/src/rpc/client.ts
      • packages/client-runtime/src/rpc/session.test.ts
      • packages/client-runtime/src/rpc/session.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

      📝 Walkthrough

      RPC tracking now uses environment display labels, and slow-ack tracking excludes client-activity requests. Connection timeout messages distinguish established connections that stop responding from connections that fail to open.

      Changes: RPC Tracking and Connection Diagnostics

      Layer / File(s)Summary
      Connection timeout diagnostics
      packages/client-runtime/src/errors/network.ts, packages/client-runtime/src/errors/transport.ts, packages/client-runtime/src/errors/transport.test.ts, packages/client-runtime/src/rpc/session.ts, packages/client-runtime/src/rpc/session.test.ts
      Established connections that stop responding report the timeout duration and an unresponsive-host hint. Initial connection failures retain the network hint. Tests cover direct and relay sessions and transport error matching.
      Request observation labels
      packages/client-runtime/src/rpc/client.ts, packages/client-runtime/src/rpc/client.test.ts, apps/web/src/connection/platform.ts
      Request observations include the target environment label. Tracked request descriptions use the environment label instead of the environment ID.
      Background RPC acknowledgment exclusions
      apps/web/src/rpc/requestLatencyState.ts, apps/web/src/rpc/requestLatencyState.test.ts
      Slow-ack tracking excludes usage-summary and client-activity RPC methods. Tests cover both methods.

      Priority: ⬇️ Low

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix

      Suggested reviewers: juliusmarminge, maria-rcks

      Merge Risk: ⚪ Minimal · up to b17c2

      No actionable merge-blocking risk was identified; the PR is mergeable with normal checks.

      Pre-merge checks: Passed 3 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Description checkWarningThe description explains the problem and the implemented changes, but it does not provide the required Scope and approval section or focused verification results. The AI review note does not replace m…Add a Scope and approval section with the triaged issue or explicit maintainer approval, or explain why this focused bug fix qualifies for an exemption. Add a Verification section that lists the focused tests or manual checks run, their obs…
      Passed Passed checks: 3 passed
      Check nameStatusExplanation
      Title checkPassedThe title clearly describes the primary fix: frozen hosts no longer produce misleading slow-heartbeat or DNS-related messaging.
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Full details: Description check

      Explanation

      The description explains the problem and the implemented changes, but it does not provide the required Scope and approval section or focused verification results. The AI review note does not replace maintainer approval or test evidence.

      Resolution

      Add a Scope and approval section with the triaged issue or explicit maintainer approval, or explain why this focused bug fix qualifies for an exemption. Add a Verification section that lists the focused tests or manual checks run, their observed results, and any checks that were not run. Keep the agent model and harness note if applicable.

      • Fix all pre-merge checks with AI
      ✨ Finishing Touches
      📝 Generate docstrings
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Comment `@coderabbitai help` to get the list of available commands.

Sign in to join this conversation.