lazyLoadCounts() read the `__sparse_index__noun` blob, but the sparse-index WRITE path was removed in 7.20.0 — new workspaces persist the 'noun' field ONLY to the column store. So on close()+reopen the sparse load found nothing and left every per-type count at 0: counts.byType / byTypeEnum / topTypes / allNounTypeCounts all read empty, while find() / getNounCount() (different sources) stayed correct. Rehydrate from the column store's 'noun' field instead. Its per-value cardinality matches the warm updateTypeFieldAffinity counts exactly because both are driven from the same addToIndex field set, in lockstep, with no visibility gate on either — so syncTypeCountsToFixed (called right after in init) reproduces the warm fixed-array values precisely. Legacy chunked sparse index kept as a fallback for pre-7.20.0 workspaces. Ground-truth verified: 12 Person + 5 Document → cold reopen now reports person:12 / document:5 (was 0), topTypes [person, document, collection]. Tests: un-skipped the intentionally-failing phase1c "warm cache on init" reopen test and strengthened it to exact persisted counts; added a warm==cold element-for-element equality test. 1464 unit + count-sync/multi-process/ clear-persistence integration green. |
||
|---|---|---|
| .. | ||
| api | ||
| benchmarks | ||
| comprehensive | ||
| configs | ||
| fixtures/import | ||
| helpers | ||
| integration | ||
| integrations | ||
| performance | ||
| regression | ||
| scripts | ||
| transaction | ||
| unit | ||
| vfs | ||
| brainy-3.test.ts | ||
| critical-error-handling.test.ts | ||
| critical-neural-validation.test.ts | ||
| critical-performance-benchmark.test.ts | ||
| model-loading.test.ts | ||
| package-size-breakdown.test.ts | ||
| package-size-limit.test.ts | ||
| setup-integration.ts | ||
| setup-semantic.ts | ||
| setup-unit.ts | ||
| setup.ts | ||
| streaming-pipeline.test.ts | ||
| type-utils.test.ts | ||