LearnNewsExamplesServices
Frontmatter
id9815
titleSanitize DreamService Handoff Formatting and Filter Config Lifecycle Gaps
stateClosed
labels
bugai
assigneestobiu
createdAtApr 9, 2026, 12:04 PM
updatedAtApr 9, 2026, 12:04 PM
githubUrlhttps://github.com/neomjs/neo/issues/9815
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 9, 2026, 12:04 PM

Sanitize DreamService Handoff Formatting and Filter Config Lifecycle Gaps

Closedbugai
tobiu
tobiu commented on Apr 9, 2026, 12:04 PM

The Problem

During the sandman_handoff.md generation logic in DreamService, escaped newlines (\\n) within the capability gaps string were not being sanitized, rendering as raw string tokens instead of proper indentation. Additionally, the autonomous GAP architecture logic was aggressively flagging internal Neo.mjs config lifecycle hooks (e.g., beforeGetWrapperStyle, afterSetData) as "Capabilities Missing Documentation/Tests," despite them being auto-generated or intentionally internal mechanisms.

The Architectural Reality

The issue was identified in DreamService.mjs across two locations:

  1. When generating docGap and testGap, the capability gap generator checked all METHOD graph nodes universally.
  2. During TTL markdown synthesis, capabilityGap.replace(/\n/g, ' ') failed to target string-literal \\n entries written prior to SQLite persistence.

File fixed:

  • ai/mcp/server/memory-core/services/DreamService.mjs

The Fix

  1. Implemented a filtering constraint testing METHOD names against the regex regex pattern /^(beforeGet|beforeSet|afterSet)[A-Z]/ to skip Neo.mjs config lifecycle hooks during capability inference.
  2. Augmented the formatting constraint during synthesizeGoldenPath to explicitly target and clean \\n literal string references out of the raw node SQLite properties.
tobiu added the bug label on Apr 9, 2026, 12:04 PM
tobiu added the ai label on Apr 9, 2026, 12:04 PM
tobiu assigned to @tobiu on Apr 9, 2026, 12:04 PM
tobiu referenced in commit d7d2cff - "fix(ai): Sanitize DreamService Handoff Formatting and Filter Config Lifecycle Gaps (#9815)" on Apr 9, 2026, 12:04 PM
tobiu
tobiu Apr 9, 2026, 12:04 PM

The native regex filter string is now omitting config lifecycle methods, and literal node breaks are cleaned correctly. Code has been merged and pushed.

tobiu closed this issue on Apr 9, 2026, 12:04 PM