Build Log
Context Vault — Fixture Implementation
August 15, 2026
Built the real three-table schema, ingestion importer, stub compiler, and promotion pipeline against synthetic fixture data — with real, working enforcement of the candidate/canonical boundary and two genuine bugs the tests caught before they could reach real personal data.
Timeline
What shipped
experiments/context-vault/package.json — type:module, zero dependencies, node:sqlite (built-in, Node >=22.5.0)
experiments/context-vault/src/memory/schema.mjs — the three-table SQLite schema (raw_evidence/candidate_memories/canonical_memories) with FTS5 indexes, plus openCompilerConnection/openPromotionConnection/openReadConnection as restricted JS wrappers that structurally enforce the write-grant boundary from architecture.md
experiments/context-vault/src/ingestion/import-export.mjs — idempotent ChatGPT-export importer, quarantines malformed input into a warnings[]/fatal_errors[] report instead of silently dropping or crashing
experiments/context-vault/src/memory/compile.mjs — a rule-based STUB compiler (deliberately not an LLM call) proving the candidate-generation pipeline shape, enforcing the asymmetric evidence-weighting rule (assistant-only evidence can never produce origin=explicit_user_statement)
experiments/context-vault/src/memory/promote.mjs — the only path from candidate to canonical memory; auto-promotes explicit_user_statement candidates only, leaves system_inference candidates for human review
experiments/context-vault/src/api/inspect-cli.mjs — inspection CLI (list/memory/timeline/pending commands) per memory-model.md §26
experiments/context-vault/tests/fixtures/sample-export.json — hand-authored synthetic ChatGPT export matching the real mapping-tree format, deliberately including an assistant-authored claim about the user and a stated-then-reversed retirement goal
experiments/context-vault/tests/enforce-read-only.test.mjs — the Council Engineer's specifically-required enforcement test: mechanically enumerates exposed connection methods and fails if any write-shaped method appears on the read-only or compiler connections
experiments/context-vault/tests/memory-model-behavior.test.mjs — behavioral tests: idempotent ingestion, asymmetric evidence weighting, supersession-not-overwrite, provenance completeness, human-review gating
“the tests write themselves as soon as the fixture forces the hard cases to actually happen”