brainy/tests/unit
David Snelling 009e50681e fix(8.0): column-store range queries honor exclusive bounds (lessThan/greaterThan)
getIdsForRange computed includeMin/includeMax correctly for every operator
(gt→false/true, lt→true/false, between→true/true) but DROPPED them when the
column store served the query — it called columnStore.rangeQuery(field,min,max)
with no flags, and the column-store path was inclusive-only. So whenever a field
lived in the column store, strict lessThan/greaterThan silently behaved as
lte/gte. The sparse-fallback path already forwarded the flags, so this was
column-store-only.

Thread includeMin/includeMax end to end:
- ColumnSegmentCursor: add textbook lowerBound/upperBound helpers and express
  binarySearchRange in terms of them. Inclusive/inclusive is byte-identical to
  the old impl (lowerBound(lo) == old binarySearchValue(lo).index; upperBound(hi)
  == old "first position after hi"). Exclusive lower advances past ALL duplicates
  of the boundary value; exclusive upper stops before them.
- ColumnStore.rangeQuery: accept the flags, apply them in the segment cursor AND
  the tail-buffer linear scan (strict > / < when exclusive). A bound taken from a
  segment's own min/max stays inclusive — it is a real stored value.
- VectorIndex/types interface + getIdsForRange call site updated.

Surfaced by brainy-complete dual-bound test (year/popularity exclusive both ends
→ ['Express','Vue.js']; React@95 and Angular@75 correctly excluded). Added 5
column-store unit tests: exclusive lower, exclusive upper, both, duplicate
boundary values, and the unflushed tail-buffer path. 1469 unit green.
2026-06-19 11:01:41 -07:00
..
aggregation feat: exact percentile and distinctCount aggregation ops 2026-05-26 16:18:47 -07:00
brainy fix(8.0): distinctCount aggregates distinct values of any type + edge-case regression tests 2026-06-17 12:03:06 -07:00
db feat(8.0): validateBackup() dry-run + includeContent blob round-trip test + clone test 2026-06-17 11:44:29 -07:00
graph feat(8.0): thread commit generation through the graph-write provider contract 2026-06-16 09:42:35 -07:00
hnsw feat(8.0): zero-config finalize + cut JS quantization (config.vector = recall + persistMode) 2026-06-15 10:08:51 -07:00
import feat(8.0)!: flip requireSubtype default to true (BRAINY-8.0-SUBTYPE-CONTRACT § C-1) 2026-06-09 14:58:25 -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 chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -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 fix(8.0): stats() per-type counts no longer inflate with HNSW re-saves 2026-06-17 17:07:58 -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
utils fix(8.0): drive query-cap off MemAvailable + floor auto-detected caps 2026-06-16 09:01:45 -07:00
vfs fix(8.0): vfs.rename() issues a metadata-only update (port of the 7.31.7 fix) 2026-06-11 15:05:12 -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 chore(8.0): Phase C + D + E — config simplification, TODO sweep, test race fix 2026-06-09 15:46:51 -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 chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00