open-brainy/src
David Snelling 96624f408c feat(open-path): init never gates on the embedding model; open goes concurrent; slow opens narrate
A production restart storm measured 90,017ms for a single brain init vs
1,117ms quiet (~80x contention multiplier), traced to performInit() eagerly
awaiting the process-global WASM embedding engine before the VFS root even
existed. Every writer's open() queued on the one throttled model compile
(90-140s on throttled CPUs).

- VirtualFileSystem.doInitializeRoot() no longer embeds '/'. The root is
  system-tier plumbing nothing ever searches; when the default WASM engine
  is active it now gets an explicit all-zero placeholder vector
  (cosineDistance returns max distance for a zero vector, so it never ranks
  ahead of real content). deferEmbedding was considered and rejected: its
  landing path kicks the embed worker synchronously right after commit,
  which would still force the cold compile within milliseconds — just off
  the awaited path, not avoided. A registered native 'embeddings' provider
  (no cold-start cost, possibly a different dimension) still embeds the
  root for real, via the new Brainy.usesDefaultWasmEmbedder() seam.

- performInit()'s eager-embedding step now only STARTS the WASM engine warm
  in the background instead of awaiting it inline. embed()/embeddingManager
  already serialize concurrent callers on one shared init promise, so the
  first real embed() converges correctly either way; a failed warm narrates
  loudly instead of surfacing as a silent latency spike or an unhandled
  rejection. eagerEmbeddings: false still means no warm at all.

- FileSystemStorage.init() batches its ~8 independent bootstrap mkdirs
  (each creates its own full subtree via recursive:true, so none depend on
  the others existing) into one Promise.all. The restore-completion step
  and initializeCounts() stay strictly sequential — they have real order
  dependencies on rootDir and systemDir respectively.

- performInit() now times five phases (storage init / generation-store
  open+fold / index init+gate / VFS bootstrap / embedding-warm-started) and
  logs one warning with the per-phase breakdown when total open exceeds
  2000ms; silent otherwise.
2026-08-25 10:09:45 -07:00
..
aggregation feat(engine): the wiring wave — stamps ride every flush, provider generations, waitForIndexed, adopt-backfill, match-all serves 2026-08-10 10:55:11 -07:00
cli refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
db fix(recovery): the fold streams and narrates; the checkpoint chain arms at the flip 2026-08-18 12:53:50 -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 feat(index): watermark stamps on every TS projection — adopt/catchup/rescan verdicts at load, stamp-after-data 2026-08-10 10:55:11 -07:00
hnsw feat(index): watermark stamps on every TS projection — adopt/catchup/rescan verdicts at load, stamp-after-data 2026-08-10 10:55:11 -07:00
import feat(namespace): NO SPECIAL NAMES + storage fidelity — the ruled completion of the field-addressing law 2026-08-03 16:59:32 -07:00
importers refactor(8.0): remove dead/deprecated code (legacy sweep) 2026-06-29 10:09:39 -07:00
indexes/columnStore feat(log): log authority is the fleet default — adopt-at-open, oracle-gated; plus the power-cut throw-site cures and the loud torn-record contract 2026-08-11 08:37:38 -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(namespace): NO SPECIAL NAMES + storage fidelity — the ruled completion of the field-addressing law 2026-08-03 16:59:32 -07:00
neural feat(namespace): NO SPECIAL NAMES + storage fidelity — the ruled completion of the field-addressing law 2026-08-03 16:59:32 -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
reprojection feat(reprojection): the one doors-open machinery — budget-capped, yielding, foreground-preempted, atomic-swap; poison records quarantine typed 2026-08-10 11:39:27 -07:00
storage feat(open-path): init never gates on the embedding model; open goes concurrent; slow opens narrate 2026-08-25 10:09:45 -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(recovery): walks are healers — the typed/tolerant boundary redrawn where block-layer fault injection proved it belonged 2026-08-11 09:20:30 -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(open-path): init never gates on the embedding model; open goes concurrent; slow opens narrate 2026-08-25 10:09:45 -07:00
universal refactor(8.0): remove dead, unreachable, and unwired modules 2026-06-24 15:18:40 -07:00
utils feat(health): the gate reads the named report — reads refuse loudly, never rebuild; open serves before it returns; the ceremony door 2026-08-24 12:45:51 -07:00
vfs feat(open-path): init never gates on the embedding model; open goes concurrent; slow opens narrate 2026-08-25 10:09:45 -07:00
brainy.ts feat(open-path): init never gates on the embedding model; open goes concurrent; slow opens narrate 2026-08-25 10:09:45 -07:00
coreTypes.ts feat(storage): the canonical count ledger — ALL-visibility scalars, unclamped totals, suspect-on-unprovable-delete 2026-08-24 09:49:29 -07:00
index.ts feat(health): the gate reads the named report — reads refuse loudly, never rebuild; open serves before it returns; the ceremony door 2026-08-24 12:45:51 -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 feat(health): the gate reads the named report — reads refuse loudly, never rebuild; open serves before it returns; the ceremony door 2026-08-24 12:45:51 -07:00
setup.ts chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00