No actionable comments were generated in the recent review.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 7195b69
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e6bbd042-3de6-4cda-8814-134b7b5276e9
External image Commits
Reviewing files that changed from the base of the PR and between 15d683c5d67fce8946ba9a4f14df3fdc106b078f and 3a68f8a6ff3cb20f95ae1e6197108ab0c30142b6.
External image Files selected for processing: 6
apps/server/src/server.tsapps/server/src/serverRuntimeStartup.test.tsapps/server/src/serverRuntimeStartup.tsapps/server/src/ws.tspackages/client-runtime/src/connection/supervisor.test.tspackages/client-runtime/src/connection/supervisor.ts
Limit details: You’ve used all 10 included reviews currently available.
Walkthrough
The server now exposes connection readiness separately from command readiness, applies readiness gates to HTTP routes and RPC methods, and starts the managed tunnel after connection readiness. The client supervisor also caps reconnect delays for 120 seconds after a stable connection.
Changes: Remote connection during recovery
Layer / File(s) Summary Separate connection readiness from command readiness
apps/server/src/serverRuntimeStartup.ts,apps/server/src/serverRuntimeStartup.test.tsStartup signals connection readiness after the HTTP listener starts. Startup errors fail both readiness gates. Tests cover slow recovery and settings-start failures. Apply readiness gates to routes, RPCs, and tunnel startup
apps/server/src/serverReadiness.ts,apps/server/src/server.ts,apps/server/src/ws.ts,apps/server/src/serverReadiness.test.tsHTTP and RPC middleware let listed connection operations run before command readiness and gate other operations on command readiness. The managed tunnel waits for connection readiness and, for pending updates, activation. Cap retries after a stable connection
packages/client-runtime/src/connection/supervisor.ts,packages/client-runtime/src/connection/supervisor.test.tsThe supervisor uses a five-second retry-delay cap during the 120-second reconnect window, then returns to the existing 300-second cap. A test checks the delay limits and reconnection. Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant HTTPListener 3 participant ServerRuntimeStartup 4 participant ServerReadiness 5 participant HTTPRoute 6 HTTPListener->>ServerRuntimeStartup: listener starts 7 ServerReadiness->>ServerRuntimeStartup: awaitConnectionReady 8 ServerRuntimeStartup-->>ServerReadiness: connection readiness result 9 HTTPRoute->>ServerReadiness: request method and path 10 ServerReadiness->>ServerRuntimeStartup: awaitConnectionReady or awaitCommandReady 11 ServerReadiness-->>HTTPRoute: run request effect when ready Suggested reviewers:
maria-rcks,t3dotgg,juliusmarminge
Merge Risk: External image Minimal · up to 3a68f
Connection endpoints become available during recovery while application requests wait. No concrete merge-blocking defect remains.
Pre-merge checks: Passed 3 · Inconclusive 1
Failed Failed checks: 1 inconclusive
Check name Status Explanation Resolution Out of Scope Changes check Inconclusive The eight files in the PR summary map to #24661: serverReadiness.ts (new), server.ts, serverRuntimeStartup.ts, ws.ts, supervisor.ts and their tests. The incremental diff from 15d683c to 3a68f8a adds c…Provide the whole-PR diff from mergeBase 7195b69 to head 3a68f8a for apps/server/src/server.ts and packages/client-runtime/src/connection/supervisor.ts. Confirm whether the peer, triage, sign-in, secret, document-text, preview-activity, rem… Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title is concise, specific, and accurately describes the primary server recovery change. Description check Passed The description clearly covers the problem, implemented changes, linked issue, verification results, and unverified scenarios. It is mostly complete, although it does not include an explicit maintaine… Linked Issues check Passed [ #24661] The requirements were verified at reviewed head 15d683c. The change to 3a68f8a is a merge of main. The visible incremental hunks keep the readiness wiring. (1) server.ts keeps `Layer.provide(…Full details: Description check
Explanation
The description clearly covers the problem, implemented changes, linked issue, verification results, and unverified scenarios. It is mostly complete, although it does not include an explicit maintainer approval comment or separate template headings.
Full details: Linked Issues check
Explanation
[
#24661] The requirements were verified at reviewed head 15d683c. The change to 3a68f8a is a merge of main. The visible incremental hunks keep the readiness wiring. (1) server.ts keepsLayer.provide(ServerReadiness.layerHttp)in the route layer. (2) serverReadiness.ts at head defineslayerHttp. Connection routes (GET /.well-known/t3/environment,/api/auth/*,/oauth/token,/api/t3-connect/*,/api/connect/*,GET /ws) wait onawaitConnectionReady. All other routes wait onawaitCommandReady.layerRpcbypasses command readiness forserverProbe,serverGetConfig,subscribeServerConfigandsubscribeServerLifecycle. Application RPCs still wait. (3) Per the previous review and the summary, the managed-tunnel fiber in server.ts waits onawaitConnectionReady. Update trials also wait on activation. The PR description documents this exception for rollback safety. (4) The reconnect window in supervisor.ts (5 s cap for 120 s after a stable session, then the 300 s ladder) was verified at 15d683c. The visible incremental hunks do not alter it. The truncated tail of the supervisor incremental diff was not read. Not implemented: the optional external-connector setting, the optional SIGTERM restart close code, the suggested 'starting/recovering' status, and the planned-restart retry notice. The first two are optional in the issue. The last two are suggestions under Asks 1 and 3. Live Cloudflare timing was not verified.
Full details: Out of Scope Changes check
Explanation
The eight files in the PR summary map to
#24661: serverReadiness.ts (new), server.ts, serverRuntimeStartup.ts, ws.ts, supervisor.ts and their tests. The incremental diff from 15d683c to 3a68f8a adds content unrelated to#24661to server.ts and supervisor.ts. In server.ts it adds peer forwarding and links, RemoteDelegation, TriageService, SourceControlSignIn, SecretResolver, DocumentText, PreviewAgentActivity and a PortScanner layer. In supervisor.ts it adds silent-socket checks and long-resume probe logic. These come from the merged main. The whole-PR summary reports server.ts +8/-12 and supervisor.ts +18/-4, which excludes this content. The supplied mergeBase 7195b69 does not confirm that. The whole-PR diff for these two files was not read, so scope cannot be decided.Resolution
Provide the whole-PR diff from mergeBase 7195b69 to head 3a68f8a for apps/server/src/server.ts and packages/client-runtime/src/connection/supervisor.ts. Confirm whether the peer, triage, sign-in, secret, document-text, preview-activity, remote-delegation, port-scanner and silent-socket changes appear in that diff. Also provide the truncated tail of the supervisor incremental diff after the probe loop, so the reconnect window code can be confirmed at head.
Finishing Touches
Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 6
- Charged: $1.50
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.