fix(core): use Observation.permalink in build_context to match the search index (#946)

Closes #929

Signed-off-by: phernandez <paul@basicmemory.com>
This commit is contained in:
Drew Cain
2026-06-10 14:05:02 -05:00
committed by GitHub
parent db578ccfdb
commit 7bb7664fae
2 changed files with 47 additions and 3 deletions
+6 -3
View File
@@ -245,9 +245,12 @@ class ContextService:
type="observation",
id=obs.id,
title=f"{obs.category}: {obs.content[:50]}...",
permalink=generate_permalink(
f"{primary_item.permalink}/observations/{obs.category}/{obs.content}"
),
# Observation.permalink is the single definition of the
# synthetic permalink format (200-char truncation plus
# content digest); rebuilding it inline diverged from the
# search index for long observations (#929). The parent
# entity is eager-loaded by ObservationRepository.
permalink=obs.permalink,
file_path=primary_item.file_path,
content=obs.content,
category=obs.category,