brainy/tests/unit
David Snelling d321cf5f33 fix(8.0): gate native graph analytics on the provider readiness flag
The optional native graph-acceleration provider exposes `isInitialized`,
which is false during its cold-start / rebuild window (engine + cursor not
yet loaded). The accessor cached the resolved provider INSTANCE but never
re-checked readiness, so `brain.graph.*` could dispatch to a not-ready
provider and throw instead of answering.

Resolve and cache the instance once, but check `isInitialized` LIVE on every
call: route to the pure-TS analytics path while the provider is not ready,
and re-engage the native path automatically the moment it flips true. This
gates every native route at once — subgraph, export, rank, communities,
path, and the query→expand fusion. Adds a test asserting the provider is
never called (and the TS fallback returns real answers) while not ready.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:18:50 -07:00
..
aggregation feat: exact percentile and distinctCount aggregation ops 2026-05-26 16:18:47 -07:00
brainy fix(8.0): gate native graph analytics on the provider readiness flag 2026-06-24 15:18:50 -07:00
db test(8.0): cover pending-tier range queries + setRetentionBudget adaptive reclaim 2026-06-23 11:11:43 -07:00
graph feat(8.0): graph analytics — brain.graph.rank / communities / path 2026-06-23 12:32:03 -07:00
hnsw feat(8.0): asOf at-gen vector defer — provider-served historical semantic search (#35) 2026-06-23 15:52:09 -07:00
import refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
indexes/columnStore fix(8.0): column-store range queries honor exclusive bounds (lessThan/greaterThan) 2026-06-19 11:01:41 -07:00
neural refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
performance feat(8.0): zero-config finalize + cut JS quantization (config.vector = recall + persistMode) 2026-06-15 10:08:51 -07:00
storage perf(8.0): cursor pagination for the verb walk — full edge pagination O(N²) → O(N) 2026-06-20 16:55:02 -07:00
transaction feat(8.0): thread commit generation through the graph-write provider contract 2026-06-16 09:42:35 -07:00
types feat(8.0): reserved-field contract — one canonical location, typed prevention, unified read/write 2026-06-11 13:13:09 -07:00
universal feat(8.0): id-normalization (#18) + aggregation min/max delete-safety + RC-safe release 2026-06-20 14:46:40 -07:00
utils feat(8.0): GraphAccelerationProvider contract — the native graph-engine seam 2026-06-21 08:12:22 -07:00
vfs feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00
boundary-no-native.test.ts test(8.0): boundary guard forbids @soulcraft/cor too (cortex→cor rename) 2026-06-19 09:03:54 -07:00
brainy-core.unit.test.ts fix(8.0): stats() per-type counts no longer inflate with HNSW re-saves 2026-06-17 17:07:58 -07:00
brainy-get-optimization.test.ts feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -07:00
create-entities-default.test.ts feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00
fieldTypeInference.test.ts feat: production-ready value-based temporal field detection 2025-10-16 13:58:57 -07:00
plugin-version-coupling.test.ts feat(8.0): version-coupling guard — a mismatched/failed native plugin fails loud, never silent JS fallback 2026-06-19 10:13:04 -07:00
plugin.test.ts feat(8.0): version-coupling guard — a mismatched/failed native plugin fails loud, never silent JS fallback 2026-06-19 10:13:04 -07:00
type-filtering.unit.test.ts feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -07:00
vfs-multi-instance-diagnostic.test.ts feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -07:00
vfs-restart-fix.test.ts feat(8.0): API simplification — remove neural()/Db.search, one storage path key, integration→0 2026-06-20 13:31:11 -07:00