brainy/tests/unit
David Snelling 9dc4c5e62b fix: metadata cold-read guard — no more silent [] on cold find({where}) (7.33.5)
Companion to 7.33.4's graph cold-read guard, now for the metadata field index. A
downstream deployment reported find({where}) returning a silent [] on a
freshly-opened brain (a native metadata provider that reports data but hasn't
loaded its field postings), blanking filtered pages after every restart.

verifyMetadataLive() — one-shot per brain on the first filtered find(): probe a
known persisted field value; if served, live (one O(1) probe on a warm brain). If
not, rebuild from canonical + re-probe; if still unserved, throw the new exported
MetadataIndexNotReadyError rather than let a silent [] pass. Inconclusive cases
(empty store, no plain field, shared-store foreign entity) resolve to live, no
false rebuild. Also exports BrainyError + GraphIndexNotReadyError (were internal).

The JS index cold-loads correctly; this guards the native path (durable cure is
cortex-side, same shape as the graph 2.7.8 cure). 4 unit tests. tsc 0, guard 4/4,
full unit 1538 pass (+1 pre-existing flaky VFS perf test, green in isolation).
2026-07-02 10:28:04 -07:00
..
aggregation feat: exact percentile and distinctCount aggregation ops 2026-05-26 16:18:47 -07:00
api refactor: rename BackupData → PortableGraph (the type is interchange, not a backup) 2026-06-19 12:30:06 -07:00
brainy fix: never serve a silent [] from find({connected}) on a cold-loaded graph 2026-06-29 16:40:02 -07:00
graph feat: add v5.8.0 features - transactions, pagination, and comprehensive docs 2025-11-14 10:26:23 -08:00
hnsw fix: mmap-vector backend capacity NaN at the provider FFI boundary 2026-06-10 09:29:54 -07:00
import fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
indexes/columnStore feat: column-store JS↔native interchange — raw-blob unify (2.4.0 #4) 2026-05-28 10:37:47 -07:00
neural fix: recalibrate find({ limit }) cap + two-tier enforcement + caller location 2026-06-08 12:49:43 -07:00
performance refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
storage fix: getNouns cursor pagination re-scanned the first page forever (permanent CPU loop) 2026-06-22 18:00:01 -07:00
types fix: update tests for Stage 3 CANONICAL taxonomy (42 nouns, 127 verbs) 2025-11-11 10:09:01 -08:00
utils fix: query-cap memory misread (MemAvailable + floor) + rootDirectory getter for native mmap fast-path 2026-06-16 08:46:39 -07:00
versioning fix(versioning): clean architecture with index pollution prevention 2025-12-09 09:36:10 -08:00
vfs fix: vfs.rename() issues a metadata-only update + rollback of fresh adds removes them 2026-06-11 14:59:40 -07:00
brainy-core.unit.test.ts feat: enforce data/metadata separation, numeric range queries, improved docs 2026-02-09 12:07:54 -08:00
brainy-get-optimization.test.ts fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
create-entities-default.test.ts fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
fieldTypeInference.test.ts feat: production-ready value-based temporal field detection 2025-10-16 13:58:57 -07:00
metadata-cold-read-guard.test.ts fix: metadata cold-read guard — no more silent [] on cold find({where}) (7.33.5) 2026-07-02 10:28:04 -07:00
plugin.test.ts refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
type-filtering.unit.test.ts fix: recalibrate find({ limit }) cap + two-tier enforcement + caller location 2026-06-08 12:49:43 -07:00
vfs-multi-instance-diagnostic.test.ts fix: recalibrate find({ limit }) cap + two-tier enforcement + caller location 2026-06-08 12:49:43 -07:00
vfs-restart-fix.test.ts fix: set verb.source/target to entity UUID instead of NounType 2026-02-02 09:20:38 -08:00