chore(knowledge): drop verbose snippet payloads from resolve log

Logging the full candidate and selected snippet bodies per resolve was
inflating log volume without adding signal we use.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-30 01:28:04 +08:00
parent 5216a4847c
commit f9ecb33d8e
@@ -854,12 +854,11 @@ func (s *KnowledgeService) logKnowledgeResolve(
zap.Int("candidate_count", len(candidates)),
zap.Int("selected_count", len(selected)),
zap.Int("precise_fact_count", len(knowledgeCtx.PreciseFacts)),
zap.Any("candidates", summarizeKnowledgeSnippetsForLog(candidates)),
zap.Any("selected_snippets", summarizeKnowledgeSnippetsForLog(selected)),
zap.Strings("precise_facts", summarizeKnowledgeFactsForLog(knowledgeCtx.PreciseFacts)),
)
}
// for debug
func summarizeKnowledgeSnippetsForLog(snippets []KnowledgeSnippet) []map[string]any {
if len(snippets) == 0 {
return []map[string]any{}