From 35465ce924428a199e7425e8975fb664ec1893fc Mon Sep 17 00:00:00 2001 From: Harsh Bansal <122075346+harshbansal7@users.noreply.github.com> Date: Wed, 18 Feb 2026 17:23:03 +0530 Subject: [PATCH] Update pkg/skills/search_cache_repro_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- pkg/skills/search_cache_repro_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/skills/search_cache_repro_test.go b/pkg/skills/search_cache_repro_test.go index d1edfc149..5b46409a9 100644 --- a/pkg/skills/search_cache_repro_test.go +++ b/pkg/skills/search_cache_repro_test.go @@ -16,12 +16,12 @@ func TestSearchCache_LRU_Behavior(t *testing.T) { cache.Put("query-C", []SearchResult{{Slug: "C"}}) // Access query-A (should make it most recently used) - // Current behavior: query-A remains at front (oldest) if Get doesn't update order + // In correct LRU behavior, this access updates the order so query-A is not evicted next. if _, found := cache.Get("query-A"); !found { t.Fatal("query-A should be in cache") } - // Add query-D. Should evict query-A if FIFO (current bug), or query-B if LRU (desired). + // Add query-D. Correct LRU behavior should evict query-B (the least recently used). cache.Put("query-D", []SearchResult{{Slug: "D"}}) // Check if query-A is still there