Fixes #3553.
Related to #3911, which addresses initial server.getConfig latency. This PR is narrower: foreground connection health checks no longer invoke configuration hydration at all.
What Changed#
- Add a dedicated
server.probe RPC that returns immediately and uses the existing orchestration-read authorization scope.
- Use that endpoint for client-runtime connection health checks instead of
server.getConfig.
- Keep
server.getConfig for initial session configuration hydration.
- Add focused coverage verifying that initialization loads configuration while subsequent probes use the lightweight endpoint.
Why#
When the application becomes active, the connection supervisor currently probes the session through server.getConfig.
That RPC performs configuration and provider discovery work, which can become slow on busy or resource-constrained Windows systems. If it exceeds the 15-second foreground probe timeout, the client treats an otherwise live WebSocket as unavailable, enters reconnecting state, and temporarily disables the composer.
A dedicated no-work RPC separates connection liveness from configuration hydration. This reduces false reconnects without changing initial configuration loading, authorization requirements, or the existing timeout and reconnect policy.
Testing#
vp test packages/client-runtime/src/rpc/session.test.ts packages/client-runtime/src/connection/supervisor.test.ts — 28 tests passed
vp check — passed with 10 unrelated existing web lint warnings
vp run typecheck — passed
git diff --check — passed
Checklist#
Note
Low Risk
Behavior change is limited to probe RPC selection; initial config loading and auth scopes stay the same, with backward compatibility for servers missing the new capability.
Overview
Introduces server.probe, a no-op RPC for liveness checks, and advertises it via the optional connectionProbe capability on the execution environment descriptor.
Client-runtime still hydrates the session with server.getConfig on connect, but RpcSession.probe now calls server.probe when the capability is present; older servers without it keep using server.getConfig for probes. The WebSocket server wires the handler with the same orchestration-read scope as other read RPCs.
Tests cover probe vs initial config traffic, legacy fallback, and supervisor behavior on application activation (probe without reconnect).
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit da511a97bb5af75f51c272932826ce776de8e2cc. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Add lightweight server.probe RPC for connection health checks#
- Adds a new
server.probe RPC contract (WsServerProbeRpc) with an empty payload and empty success response, authorized under AuthOrchestrationReadScope.
RpcSession.probe now calls server.probe when the server reports capabilities.connectionProbe: true, falling back to server.getConfig for legacy servers.
- The server advertises
connectionProbe: true in the ExecutionEnvironmentDescriptor.capabilities returned by ServerEnvironment.make.
- Behavioral Change: connection probes on capable servers now send a lightweight
server.probe request instead of the heavier server.getConfig call.
Macroscope summarized da511a9.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
39b38847-d334-4044-971c-70b4c8e2dd11You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
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