diff --git a/internal/agent/core/graphmedia_test.go b/internal/agent/core/graphmedia_test.go index c13c4a8..c7252ea 100644 --- a/internal/agent/core/graphmedia_test.go +++ b/internal/agent/core/graphmedia_test.go @@ -481,7 +481,7 @@ func TestArchiveColdDocs_KeepsDocWhenGraphWriteEmpty(t *testing.T) { // 精确构造「三元组非空 + Commit 全部拒绝」这个状态: // Source/Summary 都超过 validEntityName 的 50 字符上限, // 于是 docToTriples 产出的两条元数据三元组都被跳过。 - longSource := strings.Repeat("超长来源名", 20) // 100 字 + longSource := strings.Repeat("超长来源名", 20) // 100 字 longSummary := strings.Repeat("超长摘要文本", 20) // >80 字触发长度门槛被跳过 it, _ := ms.Stat(digest) doc := &document.Doc{ diff --git a/internal/tfidf/tfidf.go b/internal/tfidf/tfidf.go index 006a8f9..d058901 100644 --- a/internal/tfidf/tfidf.go +++ b/internal/tfidf/tfidf.go @@ -26,12 +26,12 @@ type Vector map[string]float64 // Embedder 实现 vector.MultimodalEmbedder,将 TF-IDF 稀疏向量投射为固定维度稠密向量。 type Embedder struct { - mu sync.RWMutex - tokenizer Tokenizer - docFreq map[string]int - totalDocs int - dim int - loaded bool + mu sync.RWMutex + tokenizer Tokenizer + docFreq map[string]int + totalDocs int + dim int + loaded bool fingerprint string }