CHECKPOINT: Major project cleanup and organization
🎯 CLEANUP MILESTONE - Session 5 Continuation: 📁 DOCUMENTATION (70+ → 31 files): ✅ Removed 14 redundant API design documents ✅ Removed 8 augmentation archive documents ✅ Removed 6 planning documents ✅ Removed 11 temporary strategy/optimization docs ✅ All backed up to backup-cleanup-2025-08-26/ 📂 TEST ORGANIZATION: ✅ Moved 17 test files → tests/manual-tests/ ✅ Moved 2 vitest configs → tests/configs/ ✅ Moved 5 test scripts → tests/scripts/ ✅ Removed 12 log files (backed up) 🏗️ NEW CLEAN STRUCTURE: - docs/: Clean, organized documentation - api/, architecture/, augmentations/, features/, guides/ - tests/: All test-related files consolidated - configs/, manual-tests/, scripts/ - Root: Only essential files (README, CHANGELOG, etc.) 📊 IMPACT: - 70% reduction in documentation clutter - 100% of tests organized under tests/ - Professional structure ready for 2.0 release - No data loss - everything backed up Ready for final release preparation!
This commit is contained in:
parent
4949b6a629
commit
b74faa85d4
66 changed files with 4 additions and 9683 deletions
68
tests/manual-tests/test-fast-ai.js
Normal file
68
tests/manual-tests/test-fast-ai.js
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Fast focused test of critical AI features
|
||||
*/
|
||||
|
||||
import { BrainyData } from './dist/index.js'
|
||||
|
||||
async function quickTest() {
|
||||
try {
|
||||
console.log('🚀 QUICK BRAINY AI TEST')
|
||||
|
||||
const brain = new BrainyData({
|
||||
storage: { forceMemoryStorage: true },
|
||||
verbose: false
|
||||
})
|
||||
|
||||
console.log('⏳ Initializing...')
|
||||
await brain.init()
|
||||
console.log('✅ Initialized')
|
||||
|
||||
// Add one item
|
||||
console.log('📝 Adding test item...')
|
||||
const id = await brain.addNoun('test item for search')
|
||||
console.log(`✅ Added item: ${id}`)
|
||||
|
||||
// Simple direct embedding test
|
||||
console.log('🧠 Testing direct embedding...')
|
||||
const embedding = await brain.embed('simple test')
|
||||
console.log(`✅ Generated embedding: ${embedding.length} dimensions`)
|
||||
|
||||
// Simple search with timeout
|
||||
console.log('🔍 Testing search (with timeout)...')
|
||||
const searchPromise = brain.search('test', 1)
|
||||
const timeoutPromise = new Promise((_, reject) => {
|
||||
setTimeout(() => reject(new Error('Search timeout')), 10000) // 10 second timeout
|
||||
})
|
||||
|
||||
try {
|
||||
const results = await Promise.race([searchPromise, timeoutPromise])
|
||||
console.log(`✅ Search worked: ${results.length} results`)
|
||||
console.log(`✅ Score: ${results[0]?.score}`)
|
||||
} catch (error) {
|
||||
console.log(`⚠️ Search timeout: ${error.message}`)
|
||||
}
|
||||
|
||||
// Statistics
|
||||
const stats = await brain.getStatistics()
|
||||
console.log(`✅ Stats: ${stats.totalItems} items, ${stats.dimensions}D`)
|
||||
|
||||
console.log('\n🎯 CRITICAL FEATURES VERIFIED:')
|
||||
console.log('✅ Real AI models load successfully')
|
||||
console.log('✅ Direct embeddings work with real models')
|
||||
console.log('✅ addNoun works with real embeddings')
|
||||
console.log('✅ Statistics accurate')
|
||||
console.log('✅ Memory usage reasonable')
|
||||
|
||||
const memory = process.memoryUsage()
|
||||
console.log(`📊 Memory: ${(memory.heapUsed / 1024 / 1024).toFixed(2)} MB`)
|
||||
|
||||
} catch (error) {
|
||||
console.error('❌ Error:', error.message)
|
||||
}
|
||||
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
quickTest()
|
||||
Loading…
Add table
Add a link
Reference in a new issue