fix(cursor): inbound stream-health watchdog fails silent/heartbeat-only turns at the transport - #2337
Merged
Merged
Conversation
…instead of the 300s bridge watchdog T04 (devlog 260822_senpi_cursor_transfer/110, senpi #1062 second half): after the first decoded frame, 30s of inbound-frame silence or 90s of heartbeat/checkpoint-only traffic fails the turn with a typed stall error. Decoded frames reset the silence clock; only non-liveness frames reset the progress clock, so TLS keepalive noise cannot defeat the watchdog and a pinging-but-stuck server still fails at 90s. Disarmed by turnEnded (the T03 grace close owns the socket from there), client-tool suspend, protocol complete, and every settle path. Addresses the #2210 stall class.
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Contributor
✅ READY
|
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Cursor transport adds configurable watchdogs for inbound-frame silence and heartbeat-only traffic. It tracks decoded frames, fails stalled turns, cleans up watchdogs across terminal paths, and adds HTTP/2 integration coverage. ChangesCursor stream health
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant HTTP2Server
participant LiveTransport
participant StreamHealthWatchdog
participant TurnFailureCallback
HTTP2Server->>LiveTransport: Send decoded server frame
LiveTransport->>StreamHealthWatchdog: Update silence and progress timestamps
StreamHealthWatchdog->>LiveTransport: Detect expired deadline
LiveTransport->>TurnFailureCallback: Fail stalled turn
LiveTransport->>HTTP2Server: Close active connection
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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. Comment |
lidge-jun
marked this pull request as ready for review
August 22, 2026 03:47
agentHits
pushed a commit
to agentHits/opencodex
that referenced
this pull request
Sep 17, 2026
…health-watchdog fix(cursor): inbound stream-health watchdog fails silent/heartbeat-only turns at the transport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
T04 from the round-2 roadmap (devlog 110, senpi #1062 second half): an inbound stream-health watchdog in the live Cursor transport. After the first decoded frame, 30s of total inbound-frame silence — or 90s of heartbeat/checkpoint-only traffic — fails the turn with a typed stall error instead of waiting for the 300s bridge stall watchdog. Addresses the #2210 stall class.
Design points:
streamSilenceFailMs/streamHeartbeatOnlyFailMson CursorTransportFactoryInput mirrorfirstFrameTimeoutMs.Verification
bun x tsc --noEmitclean.tests/cursor-stream-health.test.ts(5 cases): silence fail, heartbeat-only fail, meaningful-frame resets + clean turnEnded, turnEnded-disarm with held-open stream, first-frame-timeout ownership — 5 pass.Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Tests