brainy/tests/unit
David Snelling f024e56ee7 feat: add aggregation engine with incremental SUM/COUNT/AVG/MIN/MAX, GROUP BY, and time windows
Add a write-time incremental aggregation engine that maintains running
totals on every add/update/delete for O(1) read performance. Integrates
into brain.find({ aggregate }) for a unified query API.

Core features:
- AggregationIndex with defineAggregate()/removeAggregate() API
- Five aggregation operations: SUM, COUNT, AVG, MIN, MAX
- GROUP BY with multiple dimensions including time windows
- Time window bucketing: hour, day, week, month, quarter, year, custom
- Materialization of results as NounType.Measurement entities
- Debounced persistence of definitions and state to storage
- Definition change detection via FNV-1a hashing with auto-rebuild
- Infinite loop prevention for materialized entities
- 'aggregation' plugin provider key for native acceleration
- Lazy initialization (created on first defineAggregate() call)
- 73 tests (unit + integration) covering all functionality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:57:53 -08:00
..
aggregation feat: add aggregation engine with incremental SUM/COUNT/AVG/MIN/MAX, GROUP BY, and time windows 2026-02-16 16:57:53 -08:00
brainy fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
graph feat: add v5.8.0 features - transactions, pagination, and comprehensive docs 2025-11-14 10:26:23 -08:00
hnsw feat: enforce data/metadata separation, numeric range queries, improved docs 2026-02-09 12:07:54 -08:00
import fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
neural fix: flush all native providers on shutdown to prevent data loss 2026-02-01 16:23:49 -08:00
performance refactor: remove augmentation system and semantic type matching 2026-02-01 10:48:56 -08:00
storage fix(vfs): resolve two critical VFS bugs causing directory listing corruption 2025-12-04 11:22:30 -08:00
types fix: update tests for Stage 3 CANONICAL taxonomy (42 nouns, 127 verbs) 2025-11-11 10:09:01 -08:00
utils fix: eliminate flaky test timeouts and add storage adapters guide 2026-01-31 09:11:20 -08:00
versioning fix(versioning): clean architecture with index pollution prevention 2025-12-09 09:36:10 -08:00
vfs feat: add ImageHandler with EXIF extraction and comprehensive MIME detection (v5.2.0) 2025-11-03 14:06:17 -08: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
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: update tests for v5.1.0 API changes (VFS auto-init + property access) 2025-11-02 11:38:12 -08: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
workshop-vfs-diagnostic.test.ts fix: update tests for v5.1.0 API changes (VFS auto-init + property access) 2025-11-02 11:38:12 -08:00