From f52f10c7b093e412968a322720c8f130e03cdbed Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 4 Nov 2026 18:01:48 +0000 Subject: [PATCH] fix(studio): name the file store search engine scan, not memory The provider guard test refuses core code that names an add-on, and "memory" is the name of one. The file store searched its in-memory transcripts and reported the engine as "memory". It now reports "scan", as every store without an index does. Assisted-by: Claude:claude-sonnet-5-5 --- core/schema/chats_features.go | 2 +- core/services/studio/chatsearch/chatsearch.go | 2 +- core/services/studio/store/jsonsearch.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/schema/chats_features.go b/core/schema/chats_features.go index 49bbae7a46..e21b7c2abf 100644 --- a/core/schema/chats_features.go +++ b/core/schema/chats_features.go @@ -71,7 +71,7 @@ type ChatsChatHit struct { // ChatsChatSearchResponse is the response of the chat search. type ChatsChatSearchResponse struct { Hits []ChatsChatHit `json:"hits"` - // Engine is how the server searched: fts5, pg_trgm, scan or memory. + // Engine is how the server searched: fts5, pg_trgm or scan. Engine string `json:"engine,omitempty"` // Indexing is true while the server still adds earlier chats to its // search index, so older chats may be missing from the hits. diff --git a/core/services/studio/chatsearch/chatsearch.go b/core/services/studio/chatsearch/chatsearch.go index d5e440aeab..c2d373d175 100644 --- a/core/services/studio/chatsearch/chatsearch.go +++ b/core/services/studio/chatsearch/chatsearch.go @@ -120,7 +120,7 @@ type Progress struct { // Result is the answer of a search. type Result struct { Hits []Hit - // Engine is how the store searched: fts5, pg_trgm, scan or memory. + // Engine is how the store searched: fts5, pg_trgm or scan. Engine string // Partial is true when a time budget ended the search before every chat // was read (a store without an index). diff --git a/core/services/studio/store/jsonsearch.go b/core/services/studio/store/jsonsearch.go index b43b655799..d95b344ca7 100644 --- a/core/services/studio/store/jsonsearch.go +++ b/core/services/studio/store/jsonsearch.go @@ -13,7 +13,7 @@ import ( // scans them, the newest chat first, until chatsearch.ScanBudget is spent. // Result.Searched and Total say how many chats it read. func (s *jsonStore) SearchText(ctx context.Context, q chatsearch.Query) (chatsearch.Result, error) { - res := chatsearch.Result{Engine: "memory"} + res := chatsearch.Result{Engine: engineScan} terms := q.Terms() if len(terms) == 0 { return res, nil