Skip to content

v3.4.0 — Causal Ledger, Bug Hunt Hardening, and 54 MCP Tools

Choose a tag to compare

@RMANOV RMANOV released this 05 Apr 20:40
· 350 commits to main since this release

v3.4.0 — Causal Ledger, Bug Hunt Hardening, and 54 MCP Tools

sqlite-memory-mcp is now at v3.4.0.

This release adds an event-backed causal ledger for memory integrity,
file attachments, and 12 bug fixes from a systematic bug hunt across
the merge engine, FTS triggers, and audit system.

Deltas since v3.3.3

  • MCP tool count: 50 → 54
  • intelligence server: 8 → 12 tools
  • test count: ~190 → 244
  • codebase: ~35,000 lines across 7 focused servers

New features

Causal ledger and event-backed repair

A memory_events table now records every task mutation with Lamport
clocks and machine IDs. rebuild_task_from_events() can replay the
event stream to detect and repair drift between the task row and its
recorded history. Fact governance (govern_fact) supports supersede,
contradict, invalidate, and revalidate actions with bidirectional
provenance links.

File attachments

Tasks can now have file attachments stored in a dedicated
task_attachments table. The bridge export/import pipeline syncs
attachments across machines. Path traversal is defended via
_resolve_attachment_path() with Path.resolve() + parent check.

Extended memory file split

The 13 extended memory sections (memory_events, conflicts, audit
issues, artifacts, context chunks, etc.) are now exported to
individual extended_memory/<key>.json files instead of being
embedded in shared.json. This reduced shared.json from 28 MB to
5 MB and unblocked Cloudflare Pages deploys.

Bug Hunt system

A structured bug hunting methodology with 6 questionnaire documents
and 81 checkpoints, tracked in docs/bug_hunt/. Includes run
registries, checkpoint logs, and cluster analysis per wave.

Hardening: 12 bugs fixed from Bug Hunt Phase 1 and 2

Merge safety (6 fixes)

  • tombstone materialization no longer silently drops tasks with
    title=None (TS-01)
  • tombstone status "done" is preserved instead of forced to "archived"
    (TS-02)
  • NULL-fill now respects the import_content=False flag, preventing
    content from arriving during metadata-only sync (PF-02)
  • status authority corrections are no longer overwritten by LWW
    (PF-01)
  • future timestamps from clock-skewed machines are clamped to now
    instead of permanently winning all merges (LW-02)
  • extended memory import uses not payload.get(key) instead of
    == [], handling null and other falsy values correctly (EM-01)

FTS and audit (4 fixes)

  • observations table now has INSERT and DELETE triggers that update
    memory_fts, fixing entity search by observation content (FT-01,
    FT-02)
  • entity UPDATE trigger now aggregates observation text instead of
    inserting an empty string
  • rebuild_task_from_events(repair=True) now records its changes in
    memory_events so repairs are auditable (EB-03)
  • the audit repair guard no longer blocks on manually advanced
    updated_at timestamps (EB-01)

Infrastructure (2 fixes)

  • merge events are now recorded in memory_events so the audit trail
    sees cross-machine merges (PF-03)
  • schema migrations run under the same BEGIN EXCLUSIVE lock as table
    creation, preventing a race where two concurrent init_db() calls
    could both attempt the same ALTER TABLE (SM-01)

Sync improvements in the v3.3.4–v3.4.0 line

  • cross-machine merge ordering hardened with event-authoritative task
    status resolution
  • tombstone and legacy task ID preservation during merge
  • auto-heal for bridge content shrink (restores richer content from
    bridge files when local content was suspiciously truncated)
  • bridge push identity failure prevention
  • periodic pull no longer triggers a push
  • project alias normalization in the tray UI
  • centralized bridge import/merge helpers in db_utils.py
  • bridge sync lock moved outside the git repo to prevent lock file
    conflicts

Architecture today

  • server.py: 9 core memory tools
  • task_server.py: 6 task tools
  • session_server.py: 5 session/context tools
  • bridge_server.py: 6 bridge/task-sharing tools
  • collab_server.py: 9 collaboration/public-knowledge tools
  • entity_server.py: 7 entity-linking and merge tools
  • intel_server.py: 12 intelligence tools (was 8 at v3.3.3)
  • unified_server.py: optional all-in-one server exposing the full
    54-tool set

Upgrade notes

  • existing databases migrate forward automatically; the new
    memory_events, memory_cursors, task_attachments, and related
    tables are created on first init_db() call
  • the FTS observation triggers are applied via migration to existing
    databases
  • shared.json shrinks significantly after the first bridge push;
    extended memory data moves to extended_memory/ files
  • users on pre-v3.3.3 releases should read the v3.3.3 release notes
    for the server split and hardening context

Summary

v3.4.0 adds structural integrity guarantees through the causal event
ledger, fixes 12 confirmed bugs found via systematic questionnaire-
driven analysis, and grows the tool surface to 54 while keeping the
same local-first SQLite/WAL foundation.