refactor: remove augmentation system and semantic type matching

Remove the entire augmentation pipeline infrastructure (52 files,
~15,000 lines) and the semantic type matching system. These were
unused middleware layers adding complexity without value.

What was removed:
- src/augmentations/ directory (all augmentation implementations)
- src/augmentationManager.ts (pipeline orchestrator)
- src/types/augmentations.ts, src/types/pipelineTypes.ts
- src/shared/default-augmentations.ts
- Semantic type suggestion (BrainyTypes.suggestNoun/suggestVerb)
- src/utils/typeMatching/ (embedding-based type matcher)

What was preserved by relocating:
- Import handlers (CSV, PDF, Excel) -> src/importers/handlers/
- NeuralImportAugmentation -> src/cortex/neuralImportAugmentation.ts
- Type matching utilities -> heuristic inference in consumers

What was simplified:
- brainy.ts: operations call storage directly (no execute() wrapper)
- IntegrationBase: standalone class (no BaseAugmentation parent)
- BrainyTypes: validation-only (nouns, verbs, isValid*, get*)
- Pipeline: direct execution (no augmentation interception)
- index.ts: removed TypeSuggestion, suggestType exports
- package.json: removed stale types/augmentations export

Build passes, 1176 tests pass, 0 failures.
This commit is contained in:
David Snelling 2026-02-01 10:48:56 -08:00
parent ac7a1f772c
commit d1db3510be
97 changed files with 349 additions and 19705 deletions

View file

@ -33,34 +33,14 @@ console.log(`🔧 Mode: ${CURRENT_SCALE}\n`)
async function runScaleTest() {
const startTime = Date.now()
// Initialize Brainy with real augmentations
// Initialize Brainy
const brain = new Brainy({
storage: new MemoryStorage(),
augmentations: {
// These should all be REAL implementations now
batchProcessing: {
enabled: true,
maxBatchSize: BATCH_SIZE,
adaptiveBatching: true
},
connectionPool: {
enabled: true,
maxConnections: 50,
minConnections: 5
},
cache: {
enabled: true,
maxSize: 10000
},
index: {
enabled: true
}
}
storage: new MemoryStorage()
})
await brain.init()
console.log('✅ Brainy initialized with real augmentations\n')
console.log('✅ Brainy initialized\n')
// Test 1: Batch Insert Performance
console.log('📝 Test 1: Batch Insert Performance')
@ -160,35 +140,6 @@ async function runScaleTest() {
console.log(`✅ Created ${verbCount.toLocaleString()} relationships in ${verbTime}ms`)
console.log(`📈 Rate: ${verbRate.toLocaleString()} relationships/second\n`)
// Test 4: Verify Augmentations Are Real
console.log('🔧 Test 4: Verify Real Implementations')
// Check BatchProcessing stats
const batchAug = brain.augmentations.getAugmentation('BatchProcessing')
if (batchAug && typeof batchAug.getStats === 'function') {
const stats = batchAug.getStats()
console.log(` BatchProcessing: ${stats.batchesProcessed} batches processed`)
console.log(` Average batch size: ${Math.round(stats.averageBatchSize)}`)
console.log(` Throughput: ${stats.throughputPerSecond} ops/sec`)
}
// Check ConnectionPool stats
const poolAug = brain.augmentations.getAugmentation('ConnectionPool')
if (poolAug && typeof poolAug.getStats === 'function') {
const stats = poolAug.getStats()
console.log(` ConnectionPool: ${stats.totalConnections} connections`)
console.log(` Pool utilization: ${stats.poolUtilization}`)
console.log(` Total requests: ${stats.totalRequests}`)
}
// Check Cache stats
const cacheAug = brain.augmentations.getAugmentation('cache')
if (cacheAug && typeof cacheAug.getStats === 'function') {
const stats = cacheAug.getStats()
console.log(` Cache: ${stats.hits} hits, ${stats.misses} misses`)
console.log(` Hit rate: ${Math.round((stats.hits / (stats.hits + stats.misses)) * 100)}%`)
}
// Final Statistics
const totalTime = Date.now() - startTime
const stats = brain.getStats()