brainy/src
David Snelling a77b064bd7 fix: exception-safe aggregation backfill + generation-verified adoption + loud open-path guards
- Aggregation backfill walks build into a STAGING map and swap in atomically
  on completion. A mid-walk failure drops the staging map — the previous live
  state keeps serving, the aggregate stays flagged pending, and the storage
  error surfaces to the failing query. Previously the walk wiped live state
  before a scan that could throw, never cleared the pending flag on failure,
  and re-ran a full walk on every subsequent query: a silent wipe/walk/throw
  loop at the caller's retry rate.
- Failed walks are latched: retries within a 30s cooldown rethrow the recorded
  error instantly instead of re-walking, so a tight caller-side retry loop
  costs one loud error per query, never a full store walk per query.
- Persisted aggregation state is stamped with the store's committed generation
  at flush; reopen adoption requires stamp equality. Stale state (unclean
  shutdown) or over-counting state (a log truncation on a copied store pulled
  the watermark back) triggers exactly one loud rescan, never a silent adopt.
- The backfill/adoption path narrates: adoption decisions, walk start/finish
  with counts and duration, and failures all log by default.
- getNouns/getVerbs refuse a supplied-but-undecodable pagination cursor with a
  loud error instead of silently restarting the walk at offset 0 (which
  re-served page 1 forever to any while(hasMore) caller).
- The graph cold-load verb walk aborts loudly on a missing or non-advancing
  cursor with hasMore=true.
- A versioned index provider whose generation is AHEAD of the committed
  watermark (torn copy / crash-recovery truncation) is now named loudly at
  open, alongside the existing behind-direction message.
2026-07-17 16:00:11 -07:00
..
aggregation fix: exception-safe aggregation backfill + generation-verified adoption + loud open-path guards 2026-07-17 16:00:11 -07:00
cli refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
db docs: external-backups/sparse-storage guide + generation fact log concept 2026-07-16 10:30:32 -07:00
embeddings docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
errors docs: cite the cross-layer integrity contract generically in comments and notes 2026-07-14 10:11:41 -07:00
events feat: brain.onChange — the in-process change feed for every committed mutation 2026-07-10 11:24:31 -07:00
graph fix: exception-safe aggregation backfill + generation-verified adoption + loud open-path guards 2026-07-17 16:00:11 -07:00
hnsw fix: spine hardening pass 1 (part) — count symmetry, honest partial-load, flush durability, read-fault propagation 2026-07-13 08:50:07 -07:00
import refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
importers refactor(8.0): remove dead/deprecated code (legacy sweep) 2026-06-29 10:09:39 -07:00
indexes/columnStore fix: surface segment/entity read faults loudly instead of masking as absent 2026-07-13 09:14:52 -07:00
integrations chore(8.0): ES2023 target + drop DOM lib + downlevelIteration (config truth-up) 2026-07-01 10:58:04 -07:00
mcp refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
migration feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
neural docs: rename the native provider to @soulcraft/cor across public docs and JSDoc 2026-07-02 15:11:41 -07:00
patterns chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
storage fix: exception-safe aggregation backfill + generation-verified adoption + loud open-path guards 2026-07-17 16:00:11 -07:00
streaming chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase 2026-06-11 14:51:00 -07:00
transaction fix: honest counters — removal never re-reads the removed record + repairIndex recounts and persists all rollups 2026-07-14 11:51:44 -07:00
triple chore(8.0): Phase A + B — purge all @deprecated APIs + cacheManager dead branches 2026-06-09 15:33:56 -07:00
types feat: guarded plugin auto-detection — installing @soulcraft/cor is the opt-in 2026-07-02 16:19:55 -07:00
universal refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
utils fix: aggregation state adoption on reopen + single-flight backfill + query-cap ratchet removal 2026-07-17 09:20:09 -07:00
vfs fix: VFS rename moves the containment edge — no ghost in the old directory 2026-07-15 09:25:21 -07:00
brainy.ts fix: exception-safe aggregation backfill + generation-verified adoption + loud open-path guards 2026-07-17 16:00:11 -07:00
coreTypes.ts feat: committedGeneration capability + pinned durability/stability contracts 2026-07-15 12:44:52 -07:00
index.ts feat: entity-tree family stamp — sourceGeneration + rollup coherence at open 2026-07-15 10:54:20 -07:00
internals.ts feat: provider access to the fact log + shared stamp verifier via internals 2026-07-15 12:36:27 -07:00
plugin.ts docs: cite the cross-layer integrity contract generically in comments and notes 2026-07-14 10:11:41 -07:00
setup.ts chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00