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
PullStore: per-URI forget so closing one document doesn't clear every memo #52
PullStore::clear() (crates/lspkit-server/src/pull.rs:255, released in 0.5.0) is the only way to release diagnostic memos, and it drops the whole database.
A consumer that closes a single document has two bad choices:
call clear() and throw away every other open document's memos (all of them re-pull cold), or
keep the closed document's memos and inputs alive until the next solution switch (memory grows with every file opened in a session).
SharpLsp currently calls clear() on every didClose, so closing one tab invalidates diagnostics for every open tab.
Ask
A per-document eviction, e.g. PullStore::forget(&self, uri: &Uri) -> Result<(), PullError>, that:
removes the URI's input and the memos derived only from it,
leaves every other URI's memos warm (a following pull of another URI hits the cache),
makes a later pull of the forgotten URI recompute from scratch.
If Salsa can't delete inputs, an acceptable shape is a tombstone input (set the URI's text to an empty sentinel + drop it from the store's key map) plus a heap-leak test like outbound_heap_leak.rs proving open/forget cycles don't grow allocated bytes.
Acceptance tests
open A, B → pull both → forget A → pull B is a cache hit, pull A recomputes
1000 open/forget cycles of distinct URIs → heap bytes bounded (allocated == freed within tolerance)
Landing in v0.6.0 via PR #51 (not after it): d2a22c4, 029e583 (Windows agent), 950c04c, 1f05b40. PullStore::forget(uri) keeps every other document warm: same result_id and no recompute. The forgotten URI recomputes, and a close never runs the compiler. A close frees its report at once when idle, a close during an in-flight pull is freed as that pull finishes, and repeated closes queue one entry. Tests: tests/pull_forget.rs and tests/pull_forget_heap.rs (1000 distinct open/forget cycles free exactly what they allocate; closing 32 idle 64 KiB documents frees every byte). Mutants of each fix line are killed, including the two SharpLsp1 found. The reference server now calls forget on didClose. Evidence: docs/plans/issue-fix-evidence-21-26-48-49.md.
✅ Released in v0.6.0 and verified against the published crates
Release:https://github.com/Nimblesite/lspkit/releases/tag/v0.6.0 (run 44186953235, tag at 8e39446). It contains lspkit, lspkit-server, lsp-profiler and lsp-profiler-dotnet 0.6.0 on crates.io, plus @nimblesite/lsp-profiler-ui@0.6.0 on npm (with provenance), the .NET engine for 6 runtime ids, the consumer kit, an SBOM, and SHA256SUMS signed with cosign.
Method: a worktree at v0.6.0, with crates/lspkit/src and crates/lspkit-server/src replaced by the sources unpacked from the crates.io 0.6.0 downloads. The published source is byte-identical to the tag. Results against the released code:
#21 sidecar_disconnect_session: test result: ok. 2 passed; 0 failed
#26 cancel_during_a_scan: test result: ok. 1 passed; 0 failed
#48 outbound: test result: ok. 3 passed; 0 failed
#48 outbound_heap_leak: test result: ok. 1 passed; 0 failed
#48 sidecar_correlator: test result: ok. 12 passed; 0 failed
#49 uri: test result: ok. 17 passed; 0 failed
#49 uri_authority: test result: ok. 1 passed; 0 failed
#49 style_tests: test result: ok. 5 passed; 0 failed
#52 pull_forget: test result: ok. 5 passed; 0 failed
#52 pull_forget_heap: test result: ok. 1 passed; 0 failed
#53 jsonrpc: test result: ok. 21 passed; 0 failed
#53 jsonrpc_frame_heap: test result: ok. 1 passed; 0 failed
Breaking: the lspkit-server/mcp feature is removed. lsp_profiler::session::rfc3339_now is now lsp_profiler::clock::rfc3339_now. A lone %, or an encoded separator, in a file URI is now an error. Consumers on didClose should call PullStore::forget(uri) instead of clear().
Activity
PullStore::forget: evict one closed document and keep every other mem…
forget frees the closed document's diagnostics before it returns; the…
PullStore::forget: a pull retires closes queued during it; queued clo…
Test that forget never runs the compiler on the closed document (#52)
MelbourneDeveloper commentedon Nov 17, 2026
Landing in v0.6.0 via PR #51 (not after it):
d2a22c4,029e583(Windows agent),950c04c,1f05b40.PullStore::forget(uri)keeps every other document warm: sameresult_idand no recompute. The forgotten URI recomputes, and a close never runs the compiler. A close frees its report at once when idle, a close during an in-flight pull is freed as that pull finishes, and repeated closes queue one entry. Tests:tests/pull_forget.rsandtests/pull_forget_heap.rs(1000 distinct open/forget cycles free exactly what they allocate; closing 32 idle 64 KiB documents frees every byte). Mutants of each fix line are killed, including the two SharpLsp1 found. The reference server now callsforgetondidClose. Evidence:docs/plans/issue-fix-evidence-21-26-48-49.md.Evidence: the Windows section for #49, #52, #42 and the Windows-only …
Fix Windows URIs, sidecar truncation, cancellation results; add serve…
MelbourneDeveloper commentedon Nov 17, 2026
✅ Released in v0.6.0 and verified against the published crates
Release: https://github.com/Nimblesite/lspkit/releases/tag/v0.6.0 (run 44186953235, tag at
8e39446). It contains lspkit, lspkit-server, lsp-profiler and lsp-profiler-dotnet 0.6.0 on crates.io, plus@nimblesite/lsp-profiler-ui@0.6.0on npm (with provenance), the .NET engine for 6 runtime ids, the consumer kit, an SBOM, and SHA256SUMS signed with cosign.Method: a worktree at
v0.6.0, withcrates/lspkit/srcandcrates/lspkit-server/srcreplaced by the sources unpacked from the crates.io 0.6.0 downloads. The published source is byte-identical to the tag. Results against the released code:Breaking: the
lspkit-server/mcpfeature is removed.lsp_profiler::session::rfc3339_nowis nowlsp_profiler::clock::rfc3339_now. A lone%, or an encoded separator, in a file URI is now an error. Consumers on didClose should callPullStore::forget(uri)instead ofclear().