Build Log · August 15, 2026

Context Vault — Fixture Implementation

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.

  • Experiment
  • Code
  • AI Memory
  • SQLite
files written (schema, ingestion, compiler, promotion, CLI, tests, fixture)
9

files written (schema, ingestion, compiler, promotion, CLI, tests, fixture)

tests, all passing
11

tests, all passing

real bugs found and fixed by the tests
2

real bugs found and fixed by the tests

real personal data touched
0

real personal data touched

Timeline

  1. Start

    Export will take days — what to build meanwhile

    Chose: build ingestion/schema/tests against synthetic fixture data now, so the real export is a drop-in swap later

  2. Check

    First-Draft Commitment Checkpoint asked and answered skip

    Prior session's architecture.md already specified the three-table split and enforcement test requirement in enough detail — this session implements an already-reviewed design, not a new one

  3. Build

    Schema, ingestion, stub compiler, promotion, inspection CLI, fixture, tests

    node:sqlite (Node 24 built-in), zero new dependencies

  4. Spin

    Batched Write tool calls silently failed to persist 6 of 9 files

    Write tool reported success for every call; only the last file in a run of consecutive Write calls actually landed on disk each time

  5. Verify

    Ran the real test suite — found and fixed 2 real bugs

    Stale compile-time target resolution, and a foreign-key insertion-order bug in the supersession logic

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”
— Working note from this session — the Landon-soccer and retirement-reversal fixture cases weren't incidental, they were chosen specifically to force the asymmetric-evidence and supersession bugs into the open