mirror of
https://github.com/garrytan/gbrain.git
synced 2026-08-14 08:53:22 +00:00
Closes the seven e2e gaps a coverage audit surfaced: the plumbing was
well-unit-tested but the product claims ("Codex works, context shows up every
turn with real content, it remembers across restarts, machine two recovers,
Postgres works") were unproven end to end. Test-only wave — zero src changes.
- Hermetic synthetic corpus (test/fixtures/bootstrap-corpus/ + a loader helper):
12 interlinked pages (52 edges, timelines), 12 world/private beliefs, 8 gold
queries — curated from the gbrain-evals synthetic corpora, 100% placeholder
names, so recall is asserted on a real multi-entity brain instead of a
2-node self-planted probe.
- GAP1 magic moment: author a fact via the real write path, disconnect the
engine, reopen against the same DB, recall it — a real session boundary, not
verify.ts's same-connection SQL read-back. Plus a source-isolation assertion.
- GAP2 per-turn content: hook-under-serve Pin 1 now seeds a known fact and
asserts its text lands in the injected block AND private beliefs never do
(was: empty brain, empty_block accepted as a pass).
- GAP3 Codex door: assert the rendered AGENTS.md carries the Gate-3 brain-first
pull protocol; make the fake codex shim implement `mcp get` so the [FIX7]
target-verification can actually fail; the Docker cold-machine harness now
exercises the hooks/MCP registration step instead of skipping it.
- GAP4 corpus recall: turn-context + verify graph-floor/qrels run on the real
multi-entity brain with real edges.
- GAP5 attach: machine-two now re-ingests the cloned brain/ into a fresh DB and
recalls a fact authored only on machine one — the multi-device payoff.
- GAP6 keyed + Postgres (env-gated): real embeddings prove semantic recall a
paraphrase query can reach but keyless BM25 cannot; bootstrap verify drives a
real Postgres engine (skipIf DATABASE_URL/keys absent).
- GAP7 persistence: session-end runs the REAL push (not the mocked seam) to a
local bare remote and the remote receives the content; a planted secret is
blocked at the gate; the 15-min cron installs and fires a scan-gated push.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>