Context
During the Sandman Vector Apoptosis stabilization marathon, we discovered a fatal architectural trap: SQLite ON DELETE CASCADE foreign key bindings do NOT automatically propagate column indexing upon the child nodes. This allowed unindexed `$O(N \times M)# Enforce Explicit SQLite Indexing on Foreign Keys schema validation
Context
During the Sandman Vector Apoptosis stabilization marathon, we discovered a fatal architectural trap: SQLite ON DELETE CASCADE foreign key bindings do NOT automatically propagate column indexing upon the child nodes. This allowed unindexed Cartesian LEFT JOIN paths to silently deadlock the Node.js V8 execution thread processing better-sqlite3 operations on Native Edge Graphs over 50,000 vectors deep.
Scope
While the Edges(source) and Edges(target) indexes were explicitly injected via #9938, we must harden the SQLite.mjs WAL Engine structure:
- Implement a diagnostic schema assertion inside
initSchema() that actively tests database index coverage mappings natively upon system start.
- Extend
buildScripts/ai/defragSQLiteDB.mjs to execute an index mapping validation routine right before executing its SQLite VACUUM loop to explicitly ensure that any dynamically deployed edge tables from external Swarm Skills natively inherit the required index paths.
Origin Session
Origin Session ID: af26000d-914a-4eb0-8d28-2c09e9cb4cb5
Context
During the Sandman Vector Apoptosis stabilization marathon, we discovered a fatal architectural trap: SQLite
ON DELETE CASCADEforeign key bindings do NOT automatically propagate column indexing upon the child nodes. This allowed unindexed `$O(N \times M)# Enforce Explicit SQLite Indexing on Foreign Keys schema validationContext
During the Sandman Vector Apoptosis stabilization marathon, we discovered a fatal architectural trap: SQLite
ON DELETE CASCADEforeign key bindings do NOT automatically propagate column indexing upon the child nodes. This allowed unindexed CartesianLEFT JOINpaths to silently deadlock the Node.js V8 execution thread processingbetter-sqlite3operations on Native Edge Graphs over 50,000 vectors deep.Scope
While the
Edges(source)andEdges(target)indexes were explicitly injected via #9938, we must harden theSQLite.mjsWAL Engine structure:initSchema()that actively tests database index coverage mappings natively upon system start.buildScripts/ai/defragSQLiteDB.mjsto execute an index mapping validation routine right before executing its SQLiteVACUUMloop to explicitly ensure that any dynamically deployed edge tables from external Swarm Skills natively inherit the required index paths.Origin Session
Origin Session ID: af26000d-914a-4eb0-8d28-2c09e9cb4cb5