fix: treat negative keepalive replies as liveness - #28
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe keepalive implementation now treats negative SSH replies as liveness evidence. Channel probes fall back to global requests only on transport errors. Regression tests verify continued connection liveness and prevent unnecessary global fallback. ChangesKeepalive liveness handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Keepalive replies now preserve live SSH connections even when the protocol reply is negative, while unresponsive peers remain eligible for teardown. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The implementation and regression tests address negative global and channel replies, liveness resets, and channel fallback behavior. The provided summary does not confirm the required positive-reply, transport-error, and non-responsive-peer test coverage for both request paths. Resolution Confirm or add tests for positive replies, negative replies, transport errors, and non-responsive peers for both channel and global keepalives. Include evidence that transport errors trigger global fallback while negative replies do not trigger fallback. ✨ Finishing Touches✨ Simplify code
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 |
|
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
f0a94f4 to
fba59da
Compare
8107ea8 to
bef60cc
Compare
Summary
Fixes #27.
OpenSSH-style keepalive requests use the arrival of a reply as the liveness signal. A protocol-level negative reply (
ok=false, err=nil) still proves the peer received and processed the request and must therefore reset the keepalive deadline.This PR:
err == nil;Root cause
The current implementation requires:
before resetting keepalive state. For
keepalive@openssh.com, OpenSSH commonly responds with an SSH failure reply because the request is intentionally unsupported. The failure reply is still a valid response and proves transport liveness.With Devsy's default
15s * 8policy, this caused healthy OpenSSH/VS Code Remote-SSH connections to be closed after roughly 120 seconds.Validation
The updated tests cover:
CI results will be attached to this draft PR.
Summary by CodeRabbit
Bug Fixes
Tests