fix: keep windows endpoint writes progressing - #3721
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe endpoint writer limits Windows writes to 512-byte chunks and keeps full-frame writes on other platforms. Each successful partial write refreshes the timeout deadline. The large-frame flush test now uses a Suggested reviewers: Merge Risk: ⚪ Minimal · up to Windows endpoint writes are now chunked to keep large pastes progressing while successful writes refresh the stall deadline. The updated large-frame flush coverage supports the intended polling behavior, with no current merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
Greptile SummaryUpdates the native endpoint writer to prevent Windows named-pipe writes from stalling when the peer polls a small pipe buffer.
Confidence Score: 5/5The pull request appears safe to merge; the endpoint writer now preserves progress under Windows pipe backpressure without changing Unix write behavior. The Windows writer sends bounded chunks and renews its timeout only after actual progress, while the existing stop flag and no-progress timeout still terminate stalled writes. The regression test exercises a polling peer and verifies that a complete large frame is received before detach.
|
| Filename | Overview |
|---|---|
| src/client/endpoint/writer.rs | Adds Windows-specific chunked endpoint writes, progress-based stall timeout renewal, and a polling-peer regression test. |
Sequence Diagram
sequenceDiagram
participant W as Endpoint writer
participant P as Windows named pipe
participant B as Polling SSH bridge
loop Until frame is drained
W->>P: Write up to 512 bytes
alt Bytes written
P-->>W: Written byte count
W->>W: Advance frame and reset stall deadline
else WouldBlock or zero progress
W->>W: Poll until progress, cancellation, or timeout
end
B->>P: Poll and read available bytes
end
Reviews (4): Last reviewed commit: "fix: compile endpoint chunks only on win..." | Re-trigger Greptile
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
@coderabbitai review |
|
✅ Action performedReview finished.
|
8b9e159 to
f4e76a6
Compare
|
@coderabbitai review |
|
|
f4e76a6 to
0549abc
Compare
0549abc to
6bc877e
Compare
|
@coderabbitai review |
|
|
Backport herdrdev/herdr@c43bdfc and herdrdev/herdr@6bc877e. Keep the native polling-peer regression bounded. Refs herdrdev#3721, herdrdev#3651.
Append eleven coherent mailboxes without changing stable BASE. Preserve the reviewed foundation except total-count subjects, retain source credit and provenance, and reproduce accepted source 53fd505 at tree 66dcebc. All 24 Windows prefixes compile; the current installer is unchanged. Refs herdrdev#3661, herdrdev#3701, herdrdev#3721, herdrdev#3651, herdrdev#3592, herdrdev#3589, herdrdev#3770, herdrdev#3779, herdrdev#3742, herdrdev#3735, herdrdev#3781, herdrdev#3778, herdrdev#3787, herdrdev#3766, herdrdev#3755, herdrdev#3754, herdrdev#3807, herdrdev#3764, herdrdev#3760, herdrdev#3746, herdrdev#3744, herdrdev#3819, herdrdev#3759
Windows clients can disconnect a remote endpoint when pasting about 7 KB: a nonblocking named-pipe write can make no progress while the SSH bridge polls its 512-byte pipe buffer. Write Windows frames in 512-byte chunks and reset the five-second stall deadline whenever bytes advance. Unix transports keep their existing full-frame writes.
The existing native flush test now uses a polling peer and verifies a complete 1 MiB frame followed by detach. It fails with the old writer and passes with this change. Full
just checkpassed: 2,851 Rust tests plus maintenance, architecture, integration-asset and documentation checks.Runtime acceptance with one optimized Windows client and five connected servers passed Unicode routing/isolation, 64 KB pastes to both WSL servers and the Windows desktop, Windows SSH/desktop live handoff with shell PID retention, profile rename/disable/enable, client restart, output burst, and idle recovery. The 64 KB pastes completed in 7.5–13.7 seconds in the nested Windows terminal; this fixes the disconnect, but does not claim fast large-paste performance.
Stacked on #3719; this PR changes only the endpoint writer and its existing regression test. Current-head CI, deep local review, CodeRabbit and Greptile are complete and clean.
refs #3651