LearnNewsExamplesServices
Frontmatter
titleFix: DreamService RAG Migration (#9931)
authortobiu
stateMerged
createdAtApr 12, 2026, 6:54 PM
updatedAtApr 12, 2026, 7:02 PM
closedAtApr 12, 2026, 7:02 PM
mergedAtApr 12, 2026, 7:02 PM
branchesdevagent/9931-dream-service-rag-migration
urlhttps://github.com/neomjs/neo/pull/9932
Merged
tobiu
tobiu commented on Apr 12, 2026, 6:54 PM

Resolves #9931\n\n### Summary\n- Fixed DreamService graph node iteration to correctly evaluate .label instead of .type due to formal graph theory semantic mappings in Neo's internal persistence layer (where Nodes have labels, Edges have types).\n- Added explicit documentation detailing this label/type distinction.\n- Refactored DreamService.spec.mjs Playwright test mocks and fixed global teardown fs callback exceptions, ensuring 100% test pass rate.

tobiu
tobiu commented on Apr 12, 2026, 6:59 PM

Input from Antigravity (Gemini 3.1 Pro):

✦ # PR Review Summary

Status: Approved

Excellent investigative work validating the internal topological boundaries and aligning Native Edge Graph models with formal graph database semantics. The initial context collapse (hallucinating that Neo.data.Model intrinsically banned the type property) was correctly diagnosed and surgically remedied.


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 100 - Perfect alignment. Restoring .label vs .type based on canonical Graph semantics (Nodes=labels, Edges=types) ensures robust, predictable mappings for downstream GraphRAG services.
  • [CONTENT_COMPLETENESS]: 100 - The "Anchor & Echo" protocol was strictly applied across NodeModel.mjs, DreamService.mjs, and GraphService.mjs, permanently overwriting the prior framework assumptions securely.
  • [EXECUTION_QUALITY]: 100 - The code successfully solves native graph array traversal regressions. Crucially, global mock teardown operations in Playwright were appropriately sequestered to prevent test bleed.
  • [PRODUCTIVITY]: 100 - Successfully concludes the stabilization goals laid out for the DreamService architecture.
  • [IMPACT]: 80 - High-impact fix directly protecting the core logic loop of the background Memory Core daemon.
  • [COMPLEXITY]: 50 - Highly focused architectural string-mapping revisions paired with tricky test suite environment management.
  • [EFFORT_PROFILE]: Maintenance - Essential foundational remediation resolving topological regressions.

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #9931
  • Related Graph Nodes: CLASS:Neo.ai.graph.NodeModel, CLASS:Neo.ai.mcp.server.memory-core.services.DreamService

🧠 Graph Ingestion Notes

  • [KB_GAP]: The agent originally conflated the type mapping as a restriction of the Neo.data.Model configuration framework (which it is not) rather than its true origin: strict Graph Database taxonomy enforcement. Documentation now reflects this.
  • [RETROSPECTIVE]: The encapsulation of external JSON API schema boundaries versus internal persistence mechanics (SQLite/Model) must be strictly respected. Iterating over persistence arrays (nodes.items) necessitates leveraging the internal structural schema (n.label), irrespective of the public DTO shape (node.type).

📋 Required Actions

To proceed with merging, please address the following:

  • Approved for Squash Merge. No further modifications requested.

Solid closure to an extended stabilization campaign. It is safe to merge this directly into dev.