✅ MAJOR BREAKTHROUGH - Session 5 Success: - Unit tests: 18/19 passing with mocked AI (<500MB RAM) - Integration tests: Real AI models loading successfully - Core features: Real embeddings, CRUD operations verified - Architecture: All 11 augmentations, worker threads operational 📋 CRITICAL FINDINGS: - Real AI models load and cache correctly - 384D embeddings generate properly - Core CRUD operations work with real transformers - Memory management effective for production ⚠️ RELEASE BLOCKER IDENTIFIED: - Search operations timeout in test environment - Affects: search(), find(), clustering functionality - Root cause: Likely worker communication during HNSW search - Priority: MUST fix before 2.0.0 release 🎯 NEXT SESSION PRIORITIES: 1. Debug and fix search timeout issue 2. Verify search/find/clustering work in production 3. Final documentation cleanup 4. Release preparation Confidence: 90% ready (pending search functionality verification)
54 lines
No EOL
1.4 KiB
TypeScript
54 lines
No EOL
1.4 KiB
TypeScript
import { defineConfig } from 'vitest/config'
|
|
|
|
/**
|
|
* Vitest Configuration - Optimized for Memory-Intensive Tests
|
|
*
|
|
* Handles ONNX transformer model testing (4-8GB memory requirement)
|
|
* Based on 2024-2025 best practices
|
|
*/
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
setupFiles: ['./tests/setup.ts'],
|
|
environment: 'node',
|
|
|
|
// MEMORY OPTIMIZATION: Use forks for better memory isolation
|
|
pool: 'forks',
|
|
poolOptions: {
|
|
forks: {
|
|
maxForks: 1, // One test file at a time
|
|
minForks: 1,
|
|
singleFork: true, // Sequential execution
|
|
isolate: true // Isolate test files
|
|
}
|
|
},
|
|
|
|
// TIMEOUTS: Extended for ONNX model loading
|
|
testTimeout: 120000, // 2 minutes per test
|
|
hookTimeout: 60000, // 1 minute for hooks
|
|
teardownTimeout: 10000,
|
|
|
|
// PARALLELISM: Disabled to prevent memory exhaustion
|
|
maxConcurrency: 1,
|
|
fileParallelism: false,
|
|
|
|
// INCLUDE/EXCLUDE
|
|
include: ['tests/**/*.{test,spec}.{js,ts}'],
|
|
exclude: [
|
|
'node_modules/**',
|
|
'dist/**',
|
|
'scripts/**',
|
|
'**/*.browser.test.ts'
|
|
],
|
|
|
|
// REPORTERS: Dot for CI, verbose for local
|
|
reporters: process.env.CI ? ['dot'] : ['default'],
|
|
|
|
// RETRY: Once in CI for flaky tests
|
|
retry: process.env.CI ? 1 : 0,
|
|
|
|
// SHARDING: Support test splitting
|
|
// Use: VITEST_SHARD=1/4 npm test
|
|
shard: process.env.VITEST_SHARD
|
|
}
|
|
}) |