Skip to content

v0.23.0 - Reliability Hardening

Choose a tag to compare

@zzhang82 zzhang82 released this 21 Jul 06:48

v0.23.0 - Reliability Hardening

Agent Memory Bridge 0.23.0 shortens database write transactions around
embedding maintenance, contains background-lane failures, and gives schema
upgrades an explicit version contract. The public MCP surface remains at 10
tools.

0.23.0 = batched embedding work outside write transactions, typed hybrid degradation, isolated service lanes, atomic state files, and transactional schema versioning.

What Changed

  • Semantic recall, scheduled embedding maintenance, and embedding rebuilds read
    candidate rows first, call the provider in a batch outside the SQLite write
    transaction, then open a short transaction to revalidate content hashes and
    write current vectors.
  • Hybrid recall catches only typed embedding-provider failures. It returns
    lexical results with explicit degraded metadata; SQLite and programming
    failures still propagate. Explicit semantic mode reports a clear provider
    failure instead of silently changing retrieval modes.
  • Command-provider vectors must contain finite numeric values. NaN and
    infinity are rejected before storage, and invalid persisted vectors are not
    scored.
  • Chinese/Han text now contributes character and bigram tokens to the local
    hash embedding. This is a hash-semantic improvement; ordinary Chinese lexical
    recall still uses the existing LIKE fallback when FTS has no direct match.
  • Watcher, reflex, consolidation, governance, and embedding maintenance run
    through the same lane boundary. One lane failure is reported with total and
    consecutive failure counts and a capped retry delay without stopping later
    lanes.
  • All service-lane state uses tolerant JSON loading and unique temporary files
    followed by atomic replacement. A failed replacement preserves the previous
    valid state.
  • SQLite PRAGMA user_version now records ordered schema migrations. Migration
    work runs under BEGIN IMMEDIATE, rolls back DDL and version changes together,
    rejects future schema versions, and serializes concurrent legacy upgrades.

Why It Matters

Slow or unavailable embedding providers no longer stretch the bridge's write
lock across external process execution in semantic recall, scheduled
maintenance, or embedding rebuilds. A damaged state file or one failing
background lane no longer stops unrelated maintenance. Schema upgrades now
have a fail-closed version path instead of relying only on additive startup
repair.

Validation

  • pytest: 445 passed
  • integrated embedding, service, state, schema, and storage regression gate:
    114 targeted tests
  • four spawned processes opening one legacy database converged on schema
    version 1 while preserving recall
  • injected migration failure rolled back both DDL and user_version
  • release, public-surface, onboarding, dependency, package, and fresh-wheel
    gates passed before tagging
  • public MCP surface: unchanged at 10 tools

Boundaries

This release does not claim broad CJK lexical/FTS support, exactly-once Signal
creation, authenticated actors, namespace access control, multi-instance
service locking, lane-wide timeouts, or a distributed queue. Signal writes stay
append-like unless a caller supplies its own higher-level coordination
discipline. Database CHECK constraints and Signal idempotency keys remain
separate design hardening rather than reproduced v0.23 correctness fixes.
Service lanes still execute sequentially, so exception isolation does not stop
a slow lane from delaying later work. The per-lane boundary applies during
cycle execution; service startup and lane construction remain process-level.