Frontmatter
| title | fix(ai): Resolve cascading graph deletion bug in FileSystemIngestor (#9935) |
| author | tobiu |
| state | Merged |
| createdAt | Apr 12, 2026, 7:37 PM |
| updatedAt | Apr 12, 2026, 7:43 PM |
| closedAt | Apr 12, 2026, 7:43 PM |
| mergedAt | Apr 12, 2026, 7:43 PM |
| branches | dev ← agent/9935-filesystem-ingestor-graph-cascade |
| url | https://github.com/neomjs/neo/pull/9936 |
Merged

tobiu
commented on Apr 12, 2026, 7:42 PM
Input from Antigravity (Gemini 3.1 Pro):
✦ # PR Review Summary
Status: Approved
Great job diagnosing the root cause of the cascading graph deletion bug. Decoupling the structural edge assertions from the file hashing mechanism is an elegant way to resolve topology drift, and adding the
SYSTEM_ANCHORprovides a much-needed foundation for the workspace representation natively. The SQLite restore utility is also an excellent touch for managing large graph backups efficiently!
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - Solves a strict structural Native Edge Graph referential integrity issue by mapping all file nodes to a unified Root System Anchor instead of allowing orphaned floating nodes.[CONTENT_COMPLETENESS]: 100 - The logic accurately prevents Vector Apoptosis from triggering catastrophic deletions while providing a completedb-restore-graph.mjsfallback migration script.[EXECUTION_QUALITY]: 100 - BypassingisUnchangedto unconditionally ensureedgesare created resolves overarching topology drift effectively.[PRODUCTIVITY]: 100 - Fully achieves the goals outlined in Issue #9935.[IMPACT]: 90 - Protects the core memory intelligence engine from natively dropping tens of thousands of structural vector mappings during standardrunSandmanREM cycles.[COMPLEXITY]: 40 - Moderate logical shift by decoupling structural edge mappings inFileSystemIngestor.[EFFORT_PROFILE]: Heavy Lift - High impact stabilization that prevents semantic amnesia.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #9935
- Related Graph Nodes:
file-ai/examples/db-restore-graph.mjs,Neo.mjs Ecosystem Root
🧠 Graph Ingestion Notes
[RETROSPECTIVE]: The cascading Apoptosis bug effectively demonstrates why programmatic Graph topologies must always tie back to robust hierarchical anchors (likeSYSTEM_ANCHOR) that are securely shielded from heuristic Garbage Collection passes. Relying on floatingparentId: nullconstructs was a fragile anti-pattern that broke semantic tracking integrity.
📋 Required Actions
To proceed with merging, please address the following:
- Automatically Approved for Squash Merge. No remaining items.
Great work stabilizing the AI daemons!
Resolves #9935
Native Edge Sub-Graph Resolution
This Pull Request fully resolves the Apoptosis structural cascading file system deletion regression by mapping the file tree back to a protected
SYSTEM_ANCHOR.Architectural Deltas
getOrphanedNodesApoptosis culling routines.CONTAINSedge logic from behind theisUnchangedconstraint inwalkDirectory. This allows the agent memory to organically heal broken topological paths even if the local file MTime hasn't mutated.examples/db-restore-graph.mjsdirect SQLite importer script to safely recreate the corrupted20,000+node matrix, bridging old backup dumps directly onto the modern schemas.The node count is now structurally stable at
20,000+nodes during REM processing.