Skip to content

feat: call insert_or_supersede from SemanticMemory to activate APEX-MEM write path #3631

@bug-ops

Description

@bug-ops

Description

APEX-MEM append-only MAGMA (#3223) is implemented in GraphStore::insert_or_supersede_with_metrics() with full conflict resolution, ontology normalization, and supersede chain tracking. However, SemanticMemory (and all callers in src/) still use the old destructive-update path — insert_or_supersede is never called from the production memory write path.

The playbook at .local/testing/playbooks/apex-mem.md references config.apex_mem.enabled = true in [memory.graph], but this config key does not exist in zeph-config.

Reproduction Steps

  1. grep -rn "insert_or_supersede" crates/zeph-memory/src/semantic/ — no results
  2. grep -rn "apex_mem" crates/zeph-config/ — no results
  3. insert_or_supersede exists only in graph/store/mod.rs and graph/store/tests.rs
  4. 3 integration tests pass in isolation, but the write path is never activated

Expected Behavior

SemanticMemory::remember() should call insert_or_supersede (or insert_or_supersede_with_metrics) when apex_mem.enabled = true in [memory.graph] config, activating the append-only write path with conflict resolution.

Actual Behavior

The APEX-MEM write path is implemented and unit-tested in isolation, but SemanticMemory never calls it. All production writes use the legacy destructive path.

Environment

  • Version: 0.20.1
  • Features: full

Logs / Evidence

grep -rn "insert_or_supersede" crates/ --include="*.rs" | grep -v "store/mod.rs\|store/tests" → empty
grep -rn "apex_mem" crates/zeph-config/ → empty

Metadata

Metadata

Assignees

Labels

P2High value, medium complexitybugSomething isn't workingenhancementNew feature or requestmemoryzeph-memory crate (SQLite)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions