You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sidecar reader silently treats truncated frames as clean EOF #21
Native sidecar connections currently treat any UnexpectedEof from the shared frame reader as a clean end of stream. That error also occurs when a peer closes after part of the four-byte length prefix or part of a declared payload. Consumers therefore receive None instead of a terminal error and can miss a backend failure.
Reproduced against f693a58 with a real local TCP connection, including a complete valid response followed by a truncated frame. A zero-byte disconnect should remain clean; partial prefixes and partial payloads must produce a visible error, preserve previously received responses in order, and release both response and notification channels.
The regression test fails with truncation is an error, not clean EOF. The minimal fix probes for zero-byte EOF, then feeds the first byte and remaining stream through the existing shared frame decoder. The unchanged native regression passes after that fix.
Evidence: SharpLsp target/diagnostics-repro/transport-truncation-red.log and transport-truncation-green.log. Fix and tests will be linked from the upstream pull request.
Method: git worktree at tag v0.5.0; replaced crates/lspkit/src, crates/lspkit-server/src and crates/lspkit-server/examples with the sources unpacked from the crates.io 0.5.0 downloads (sha256 lspkit fca7d7fa…f5ce7, lspkit-server 1472ab35…231f2). git status stayed clean: the published source is byte-identical to the tag. Rebuilt diagnostic-reference from it and ran the regression test:
lspkit 0.5.0: crates/lspkit/tests/sidecar_disconnect_session.rsnative_disconnects_preserve_prefix_and_payload_failures_after_valid_traffic → ok (1 passed)
Red→green evidence for the fix itself: docs/plans/issue-fix-evidence-21-26-48-49.md (PR #51).
Artifact: the crates published on crates.io, lspkit = "=0.10.1" and lspkit-server = "=0.10.1". The scratch package has no path or git dependencies, and Cargo.lock gives source = "registry+https://github.com/rust-lang/crates.io-index" for both. The diagnostic-reference binary these tests drive is the one shipped inside the published lspkit-server-0.10.1.crate, copied from the unpacked tarball.
Steps
Create a scratch package depending only on the published crates.
Copy the regression tests from the repo. Every assert*/expect/matches! line was diffed against the repo and is identical.
cargo test --features pull
Results:diagnostic_reference 7/7, sidecar_disconnect_session 2/2, uri 17/17, uri_authority 1/1, 0 failed. A control run against 0.5.0 fails as expected.
This issue:native_disconnects_preserve_prefix_and_payload_failures_after_valid_traffic (sidecar_disconnect_session) passes. It drives the real diagnostic-reference --backend/--receive child over OS stdio:
a zero-byte EOF stays a clean end;
a torn 2-byte length prefix and a torn 5-byte body each give exactly one terminal error;
earlier valid responses are kept, in order;
both the response and notification channels are released.
Activity
Preserve truncated sidecar failures and enforce coverage gates
MelbourneDeveloper commentedon Nov 17, 2026
Verified against the released v0.5.0 crates
Method:
git worktreeat tagv0.5.0; replacedcrates/lspkit/src,crates/lspkit-server/srcandcrates/lspkit-server/exampleswith the sources unpacked from the crates.io 0.5.0 downloads (sha256 lspkitfca7d7fa…f5ce7, lspkit-server1472ab35…231f2).git statusstayed clean: the published source is byte-identical to the tag. Rebuiltdiagnostic-referencefrom it and ran the regression test:crates/lspkit/tests/sidecar_disconnect_session.rsnative_disconnects_preserve_prefix_and_payload_failures_after_valid_traffic→ ok (1 passed)Red→green evidence for the fix itself:
docs/plans/issue-fix-evidence-21-26-48-49.md(PR #51).Fix Windows URIs, sidecar truncation, cancellation results; add serve…
MelbourneDeveloper commentedon Nov 20, 2026
✅ Verified against the published v0.10.1 crates
Artifact: the crates published on crates.io,
lspkit = "=0.10.1"andlspkit-server = "=0.10.1". The scratch package has no path or git dependencies, andCargo.lockgivessource = "registry+https://github.com/rust-lang/crates.io-index"for both. Thediagnostic-referencebinary these tests drive is the one shipped inside the publishedlspkit-server-0.10.1.crate, copied from the unpacked tarball.Steps
assert*/expect/matches!line was diffed against the repo and is identical.cargo test --features pullResults:
diagnostic_reference7/7,sidecar_disconnect_session2/2,uri17/17,uri_authority1/1, 0 failed. A control run against 0.5.0 fails as expected.This issue:
native_disconnects_preserve_prefix_and_payload_failures_after_valid_traffic(sidecar_disconnect_session) passes. It drives the realdiagnostic-reference --backend/--receivechild over OS stdio: