open-brainy/src/db
David Snelling ed7d1db97e
All checks were successful
CI / Node 22 (push) Successful in 12m13s
CI / Node 24 (push) Successful in 12m9s
CI / Integration + conformance (Node 22) (push) Successful in 18m16s
CI / Bun (latest) (push) Successful in 12m20s
fix(recovery): the fold streams and narrates; the checkpoint chain arms at the flip
A production brain's first process boot after a live authority flip looked
hung and was restarted three times mid-recovery — three defects with one
scene. (1) THE FOLD MATERIALIZED THE LOG: peekFactsAbove(0) decoded every
fact into one array (GBs of after-images on a ~7k-fact log, a GC storm, a
starved write lane). The fold now STREAMS one segment-batch at a time —
memory is one segment at any log size — with structural ordering asserted
loudly. (2) THE FOLD WAS SILENT UNTIL DONE: minutes of boot work with zero
narration is what invited the restarts. It now announces itself BEFORE the
work ('do not restart, the fold is finite') and prints progress every
thousand facts. (3) THE CHAIN COULD ONLY ARM AT A CRASH: a live mid-session
flip left the fold checkpoint unfounded, so the brain's first unclean boot
paid a whole-log fold. Adoption now founds the checkpoint AT THE FLIP — one
paged full canonical barrier (bounded memory), then the stamp — so bounded
recovery holds from minute zero for every store that flips, at any size.

Pinned: a non-fresh flip stamps immediately; the first post-flip unclean
boot folds bounded (an unflushed at-ack fact above the checkpoint is
restored; a barrier-covered row below it is outside the fold). Kill matrix
and both adoption suites green alongside.
2026-08-18 12:53:50 -07:00
..
db.ts feat(namespace): NO SPECIAL NAMES + storage fidelity — the ruled completion of the field-addressing law 2026-08-03 16:59:32 -07:00
errors.ts feat: canonical enumeration mode for export — storage-walked, canon-complete, with an index-drift report 2026-07-27 11:08:19 -07:00
factLog.ts fix(recovery): the fold streams and narrates; the checkpoint chain arms at the flip 2026-08-18 12:53:50 -07:00
factLogFormat.ts fix(log): pad-frame construction is total; the at-ack sync-failure compensation splits by phase — a production adoption's two write-path defects, cured at their roots 2026-08-12 16:09:48 -07:00
familyStamp.ts feat: provider access to the fact log + shared stamp verifier via internals 2026-07-15 12:36:27 -07:00
faultInjectionStorage.ts feat(log): fact-log format v2 codec — record envelope, type registry, genesis, sector seals; fault-injection shim 2026-08-10 09:29:06 -07:00
fieldAddressing.ts feat(query): the sparse-store cut — where on a never-carried field serves operator truth, never a refusal 2026-08-12 15:57:19 -07:00
generationSegments.ts feat: generation-segment store — the D1+D3 packed-tier file format 2026-07-19 15:14:27 -07:00
generationStore.ts fix(recovery): the fold streams and narrates; the checkpoint chain arms at the flip 2026-08-18 12:53:50 -07:00
logAuthority.ts fix(adoption): the baseline backfill runs to completion — one call adopts a pre-log baseline of any size 2026-08-17 12:53:04 -07:00
portableGraph.ts feat: includeHidden — export carries every visibility tier for migration-grade canon completeness 2026-07-27 11:22:25 -07:00
stableEqual.ts feat(8.0): temporal range verbs — diff, history, since(gen|Date), asOf{exclusive}, transactionLog window 2026-06-19 13:21:02 -07:00
types.ts fix(locks): live writers are never auto-evicted; evicted writers are fenced at every commit barrier 2026-08-17 16:26:41 -07:00
whereMatcher.ts feat(namespace): egress guard + validation speak the law — whereMatcher's resolver reads system.* from the record and bare names from the metadata bag only (the bare-system switch is dead); validateFindParams refuses cursor/includeRelations/writeOnly typed (accepted-and-ignored dies as a class), validates order, and parses every orderBy address 2026-08-03 15:51:14 -07:00