CRITICAL BUG FIX - VFS file corruption since v5.0.0 Root cause: BlobStorage.initCompression() is async but called without await in constructor, creating race window where write() happens before zstd loads. Result: Data written uncompressed, metadata says "compressed" → read attempts decompression → garbage → hash mismatch → "Blob integrity check failed" error. Impact: VFS files (Workshop) written in first 100-500ms after BlobStorage creation are permanently corrupted and unreadable. Data loss for users. Fix (3 changes in BlobStorage.ts): 1. Added compressionReady flag to track init state (line 108) 2. Added ensureCompressionReady() to await init before write (lines 162-170) 3. Store ACTUAL compression state in metadata, not intended (line 227) This ensures: - Compression fully initialized before first write - Metadata accurately reflects what actually happened - No corruption even if zstd fails to load Tests: All 30 BlobStorage unit tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| augmentations | ||
| cli | ||
| config | ||
| cortex | ||
| critical | ||
| data | ||
| distributed | ||
| embeddings | ||
| errors | ||
| graph | ||
| hnsw | ||
| import | ||
| importers | ||
| interfaces | ||
| mcp | ||
| neural | ||
| patterns | ||
| query | ||
| scripts | ||
| shared | ||
| storage | ||
| streaming | ||
| triple | ||
| types | ||
| universal | ||
| utils | ||
| versioning | ||
| vfs | ||
| augmentationManager.ts | ||
| augmentationPipeline.ts | ||
| brainy.ts | ||
| coreTypes.ts | ||
| cortex.ts | ||
| index.ts | ||
| pipeline.ts | ||
| setup.ts | ||
| unified.ts | ||
| worker.ts | ||