open-brainy/tests/lifecycle
David Snelling 9730835bdf
All checks were successful
CI / Node 24 (push) Successful in 12m22s
CI / Node 22 (push) Successful in 12m32s
CI / Integration + conformance (Node 22) (push) Successful in 19m42s
CI / Bun (latest) (push) Successful in 12m15s
feat(vector): the vectored-noun scalar joins the count ledger; the open gate closes the vector leg
The coverage denominator the health-by-accounting ratification named for
the vector family — never built until now, and its absence was measured as
the exact outage class it existed to prevent: a migrated store with
canonical vectors and no derived index opened with the vector leg EMPTY,
served [] from vector search with no error, and the report-driven read gate
had nothing to refuse on (the provider's coverage invariant was honestly
unledgered — the denominator was ours to supply).

- getCanonicalCounts() gains vectors: { all } — the count of canonical
  nouns holding a REAL vector. Incremented where a vector lands (the
  isNew-gated metadata seam for explicit vectors — the same discipline that
  keeps HNSW neighbor-link re-saves from inflating counts; a narrow
  noteVectorLanded hook for the deferred-embed landing, gated on the
  worker's own pre-embed read). Decremented on a proven delete of a
  vectored noun; a vector-uncertain delete marks the ledger suspect rather
  than guessing (no new reads on the delete path). Recounted by the
  sanctioned recount; legacy counts.json derives it once (a deferred noun's
  vector file exists with an empty vector, so presence requires one
  content read at derivation — never on the hot path).
- The open gate's vector leg: when a health-reporting provider claims
  serving while the index holds zero nodes and the ledger proves vectored
  canonical rows exist, open BUILDS (narrated) — routed through the
  provider's idempotent fillFromCanonical() when exposed (the joint door;
  a partial shortfall stays repair()'s operator business), the JS rebuild
  otherwise — or fails typed pre-serve. Scoped exactly: bare isReady()
  providers, migrating providers, and white-box size stubs open as before.

Pinned end-to-end from the partner gate's probe shape (store with vectored
canonical rows, no derived index, reopen → search serves N, never []),
red-proved against the pre-fix path; the inverse (zero vectored rows) opens
without building and serves [] honestly.
2026-08-25 15:31:19 -07:00
..
biography.test.ts feat(vector): the vectored-noun scalar joins the count ledger; the open gate closes the vector leg 2026-08-25 15:31:19 -07:00
biographyHarness.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
README.md docs(release): the 10.4.0 entry, the index-health concept doc, and the API surfaces — written from the tree, not the plan 2026-08-25 10:02:25 -07:00

The Lifecycle Lane

One brain, driven through founding, a working day, a clean restart, a crash, a repair, and a second life, checked chapter by chapter against an independent shadow-model referee (biographyHarness.ts). It catches COMPOSITION regressions unit tests miss — a store fine in one process but broken across a restart/crash/repair. Runs on the plain JS engine, so it gates every commit.

Run it: npx vitest run tests/lifecycle --pool=forks

A red names the chapter label, the id, and expected-vs-actual — diagnosable from the message alone. biography.test.ts is split into two it blocks (Ch1-3, then Ch4-6) purely for reporting; it is still ONE fixed-order story. Chapters must never be reordered, skipped, or made conditional, and a failing chapter's assertion must never be weakened to force green.

Lab notes (hard-won, keep):

  • git reset --hard does NOT remove untracked files — a "clean" tree can still carry stray test stores; use git clean -fd tests/lifecycle-tmp equivalents.
  • silent: true patches console process-wide — never assert narration through console spies in this lane; the engine's always-on channel is prodLog.