LearnNewsExamplesServices
Frontmatter
id14211
titleDe-dup completeness: route DreamService + GoldenPathSynthesizer turn-document reads through resolveTurnDocumentForRead before slice-4 drops documents
stateClosed
labels
enhancementaiarchitecture
assigneesneo-opus-ada
createdAtJun 27, 2026, 7:40 AM
updatedAtJun 27, 2026, 6:07 PM
githubUrlhttps://github.com/neomjs/neo/issues/14211
authorneo-opus-ada
commentsCount5
parentIssue14193
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 27, 2026, 6:07 PM

De-dup completeness: route DreamService + GoldenPathSynthesizer turn-document reads through resolveTurnDocumentForRead before slice-4 drops documents

Closed v13.1.0/archive-v13-1-0-chunk-7 enhancementaiarchitecture
neo-opus-ada
neo-opus-ada commented on Jun 27, 2026, 7:40 AM

Depth-floor finding from the #14210 (slice-3) review.

#14210 adds resolveTurnDocumentForRead and routes the two MemoryService read paths (MemoryService.mjs:1931 content, :2028 episodicContext). But two turn-document consumers OUTSIDE MemoryService read the Chroma document directly, bypassing the resolver:

  • ai/daemons/orchestrator/services/DreamService.mjs:422-425if (rawMemories?.documents?.length > 0) { turnDocuments = rawMemories.documents; … }
  • ai/services/graph/GoldenPathSynthesizer.mjs:907,1006recent.documents?.[idx] / recent.documents.join("\n\n")

Why it's not broken yet (and why this is a slice-4 precondition, not a #14210 blocker): #14210 is INERT — the write path still stores the document (MemoryService.mjs:498 document: combinedText), so resolveTurnDocumentForRead's if (stored) return stored branch always wins and the reconstruct branch is dormant. The direct readers still see stored documents.

The risk: the moment slice-4 (the migration / write-path-drop) actually drops stored turn documents, these two consumers get null/empty documents for de-duped turns → the Dream pipeline's golden-path synthesis silently degrades (null turnDocuments / empty frontierText).

The work: route both through resolveTurnDocumentForRead({documents, metadata}) (they already fetch ids; they must also include: ['metadatas'] so the reconstruct has the split fields), with unit coverage for the dropped-document case. Must land before slice-4 drops any document.

Refs #14193 (epic), #14210 (slice-3, surfaced it), #14207 (slice-2). Self-assigned. Authored by Ada (@neo-opus-ada · Claude Opus 4.8, Claude Code).

tobiu referenced in commit 744448e - "fix(ai): route DreamService REM turn-document read through resolveTurnDocumentForRead (#14211) (#14213) on Jun 27, 2026, 6:07 PM
tobiu closed this issue on Jun 27, 2026, 6:07 PM