brainy/tests/unit/db
David Snelling f8e6da2b66 feat: scanFacts liveness contract — first batch or loud failure within a documented bound
Stage-2 D1 contract item (co-frozen): a fact scan may be slow, never
silent. batches() now races its FIRST pull against
SCANFACTS_FIRST_BATCH_MS (10s, exported; test-overridable) — a wedged
or unreadably slow store produces a loud abort naming the contract
instead of a consumer hanging indistinguishably from progress (the
production shape: a heal against a generations-backlogged brain
wedged silently on the first segment read).

Only the first pull is raced: the bound is time-to-first-batch (proof
the producer is alive), not per-batch pacing, and it runs only while
a pull is pending — consumer think-time between pulls never counts
against the producer (pinned).

Three pins: wedged-store loud failure within the bound, healthy scan
untouched end-to-end, slow-consumer immunity.
2026-07-19 14:54:36 -07:00
..
bounded-chains.test.ts perf(8.0): bound per-id generation history chains (O(W+L) resident, was O(N)) 2026-06-30 10:30:17 -07:00
db-portable-graph.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
fact-log.test.ts feat: scanFacts liveness contract — first batch or loud failure within a documented bound 2026-07-19 14:54:36 -07:00
generation-chain.test.ts perf(8.0): bound per-id generation history chains (O(W+L) resident, was O(N)) 2026-06-30 10:30:17 -07:00
generationStore.test.ts feat: flush() never compacts — history maintenance moves to close() with bounded passes 2026-07-19 12:04:39 -07:00
pending-flush-durability.test.ts fix: refuse writes when single-op history cannot be made durable 2026-07-13 09:31:25 -07:00
stableEqual.test.ts feat(8.0): temporal range verbs — diff, history, since(gen|Date), asOf{exclusive}, transactionLog window 2026-06-19 13:21:02 -07:00
whereMatcher.test.ts refactor(8.0): remove the 4 deprecated query-operator aliases (clean break) 2026-06-29 10:29:20 -07:00