v0.7.1 · attested-cortex · hardening patch

Hardened.
Postgres·AGE A2A-validated.

v0.7.1 is the hardening patch line over v0.7.0 (attested-cortex). A 26-task, adversarial-audit-driven EPIC (#1683) closes a critical recall crash, federation catch-up row-loss, persona & synthesis atomicity gaps, knowledge-graph invalidated-edge correctness on both the CTE and Apache AGE paths, unbounded GC/offload/nonce-cache growth, and recall-quality & capability-honesty gaps — then proved it on a live DigitalOcean PostgreSQL 18 + Apache AGE + pgvector agent-to-agent federation run.

26-task EPIC #1683 schema v57 (unchanged) PG18 + AGE + pgvector A2A ✓ 5613 + 6034 tests / 0 failed
What v0.7.1 is

A patch you can trust the substrate under load.

v0.7.0 made the substrate articulate and cryptographically attested. v0.7.1 makes it not break under you: every fix below was found by a full-spectrum codegraph + ai-memory NHI audit (31 confirmed findings, zero fabricated citations) or by exercising the real PostgreSQL + Apache AGE backend on live DigitalOcean droplets. No net-new feature surface, no schema migration — this is hardening. The advertised surface is identical to v0.7.0's: 74 MCP tools at --profile full, 89 production HTTP route registrations (75 unique paths), 80 CLI subcommands (82 under --features sal), schema v57.

The hardening

What changed.

crash / data-loss

No more recall panic

#1684 (critical): a NaN/non-finite HNSW cosine distance hit partial_cmp().unwrap() and panicked the MCP/HTTP process mid-recall. Distances now floor to f32::MAX and sorts use total_cmp.

#1687: federation catch-up advances its watermark only on a successful, non-halted apply — a transient error no longer silently skips a row.

#1692: the HNSW semantic branch detects vector-dimension mismatch and skips (counting) instead of scoring across incompatible spaces.

atomicity

All-or-nothing writes

#1688: persona generation (insert + links + metadata) is now transactional.

#1700: the online memory_store synthesis apply (N updates + N deletes + insert) is wrapped in a transaction with deferred vector-index ops — a mid-sequence failure can no longer leave a partially-merged cluster.

knowledge graph

Retracted edges stay retracted

#1689: current-view traversals exclude invalidated edges on the postgres find_paths CTE and the Apache AGE kg_query / find_paths Cypher paths — a retracted link no longer influences results, matching the sqlite default. Verified by a live-AGE semantic test.

bounded growth

GC actually runs

#1690: the offloaded_blobs TTL sweep and recall_observations pruner are wired into serve; pure-MCP deployments reap expired offload blobs on write; and the federation_nonce_cache disk mirror is pruned on eviction + bounded on hydration — closing an unbounded-growth class.

governance

Gates that don't have holes

#1685: the GOVERNANCE_PRE_ACTION agent-action gate installs on the MCP surface, not just HTTP.

#1686: rules keygen warns when it disables enabled unsigned rules.

rules migrate-on-open: ai-memory rules now migrates a fresh db on open, fixing Form-7 governance bootstrap on fresh postgres-backed peers.

recall quality

Same ranking on every transport

#1691: HTTP recall now runs the autonomous-tier cross-encoder reranker on the hybrid path (sqlite & postgres), so a recall ranks identically over MCP, CLI and HTTP.

n14: a new [reranker].score_floor / AI_MEMORY_RERANK_SCORE_FLOOR knob wires the previously-dead score-floor calibration.

config

Per-namespace curator

#1671 / n15: a new [curator] section makes curator --reflect --all-namespaces honor a per-namespace reflection_pass.enabled gate (previously inert), and lets the confidence-decay sweep apply a per-namespace half-life on both the sqlite and postgres paths.

honesty

Capabilities that don't lie

#1672 / #1673 / #1674: curator_mode reports the SAL feature gate honestly, callable_now is honest for an unknown caller, and the non-sal build reports the live db_schema_version instead of a hardcoded 0.

Validated on real infrastructure

PostgreSQL 18 + Apache AGE + pgvector, A2A federation.

v0.7.1 was provisioned to live DigitalOcean droplets — two ai-memory daemon peers federating over TLS+mTLS against a shared PostgreSQL 18.4 / Apache AGE 1.7.0 / pgvector 0.8.2 substrate — and exercised end-to-end. The run itself surfaced (and fixed) a real substrate bug (the rules CLI not migrating a fresh db) and three deployment-harness defects.

29/29baseline verification checks green
39/41full-spectrum A2A checks green (0 fail)
v57schema confirmed on both peers

What passed

  • storage_backend=postgres, db_schema_version=57 on both peers
  • PG 18.4 / AGE 1.7.0 / pgvector 0.8.2, AGE graph present
  • federation write → convergence over TLS+mTLS
  • mTLS rejects rogue/absent client certs; api-key & admin gating
  • zero-touch CA enrollment; fail-closed 401 on unenrolled peers
  • unsigned-write 403 (attestation gate live); replay refused; signed-events chain intact
  • private + namespace isolation; curator active, no crash-loop

Found & fixed by the run

Substrate: ai-memory rules opened the db without migrations, so a fresh db had no governance_rules table — breaking Form-7 governance bootstrap on fresh postgres peers. Now migrates on open (with a regression test).

Harness (deploy/do-1461): a serve unit passing both --db and --store-url (mutually exclusive in v0.7.1); governance provisioning ordered before the daemon/schema existed; a VPC CIDR collision. All fixed.

Release gates

Green on both feature sets.

5613default tests passed
6034sal-postgres tests passed
0failed

cargo fmt --check  clippy -D warnings -D pedantic (default + sal-postgres)  cargo audit

Install

Get v0.7.1.

# crates.io
cargo install ai-memory --version =0.7.1 --locked

# Docker (GHCR)
docker pull ghcr.io/alphaonedev/ai-memory:0.7.1

Drop-in over v0.7.0 — no schema migration, no config changes required. The full upgrade matrix lives in the compatibility matrix, and every change is itemized in the changelog.

Distribution

Distribution channels.

ChannelInstall
GitHub Releasethis page — binary tarballs for 5 targets + .deb/.rpm + iOS/Android artifacts
crates.iocargo install ai-memory --version 0.7.1
Homebrew tapbrew install alphaonedev/tap/ai-memory
ghcr.iodocker pull ghcr.io/alphaonedev/ai-memory:0.7.1
Fedora COPRsudo dnf copr enable alpha-one-ai/ai-memory && sudo dnf install ai-memory
PyPI (Python SDK)pip install ai-memory-mcp==0.7.1
npm (TypeScript SDK)npm install @alphaone/ai-memory@0.7.1

Targets: x86_64/aarch64 Linux, x86_64/aarch64 macOS, x86_64 Windows.