land: applicability-cache-lru

Merged
AF
3d ago
+95-6

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Changes the applicability cache to evict only the least recently used idle snapshot when it reaches its 64-entry cap, instead of dropping every idle snapshot on each new key insertion.

Previously, lookups at the cap discarded the warm snapshot they were about to read, causing a full rescan of roots in active use. Now, recently used snapshots survive the cap, and a cached key is never dropped by its own lookup.

  • Adds a test reproducing the old failure and verifying the new eviction policy.
  • Adds release notes and a benchmark descriptor for the change.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Changes the language-server applicability cache to remove the least recently used idle entry instead of clearing every idle entry at capacity.

  • Project applicability checks keep recently used cache entries and drop the oldest idle ones.

No actionable issues were found. Tests were inspected but not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Look up root and configuration] --> B{Key already cached?}
  B -->|Yes| E[Record latest use]
  B -->|No| C{At capacity?}
  C -->|Yes| D[Remove oldest idle entries if available]
  C -->|No| F[Insert entry]
  D --> F
  F --> E
  E --> G[Reuse valid result or share a scan]

Reviews (1) · Last reviewed commit: "release notes and search-quality descrip..." · Reviewed by Greptile