Two platform-wide production fixes for consumers on bare VMs / mmap-filesystem storage. BUG A — auto maxQueryLimit collapsed to ~1000 on healthy VMs → 500s on legitimate queries. getAvailableMemory() read os.freemem() (kernel MemFree, which excludes reclaimable page cache and reads as tens of MB on a page-cache-heavy mmap box). Now reads /proc/meminfo MemAvailable (the `free -h` figure), falling back to os.freemem() only off-Linux; auto-detected caps (container/free branches) are floored at 10k so a misread can't collapse them. Explicit maxQueryLimit/reservedQueryMemory are honored as-is. BUG B — native mmap vector fast-path never engaged (per-entity reads → 57s cold start on a 283MB brain). FileSystemStorage now exposes a public `rootDirectory` getter; the native vector provider feature-detects it to enable its memory-mapped graph path. brainy stored it as the protected `rootDir`, so the gate silently failed. Self-heals after the first post-upgrade flush writes the mmap file. Regression tests: auto-cap floor (container/free/explicit-override) + the rootDirectory getter. Build clean; full suite 1483 green. |
||
|---|---|---|
| .. | ||
| collation.test.ts | ||
| contentExtractor.test.ts | ||
| entity-id-mapper-stability.test.ts | ||
| entity-id-mapper-u32-ceiling.test.ts | ||
| memoryLimits.test.ts | ||
| metadataIndex-text-indexing.test.ts | ||
| metadataIndex-type-aware.test.ts | ||
| mutex.test.ts | ||
| paramValidation.test.ts | ||
| resultRanking.test.ts | ||
| roaring-bitmap-integration.test.ts | ||
| unifiedCache-eviction.test.ts | ||
| vectorQuantization-sq4.test.ts | ||