Skip to content

Fix correctness, durability, and API parity fixes across all subsystems#1

Merged
calebevans merged 9 commits into
mainfrom
bug-fixes
Jul 15, 2026
Merged

Fix correctness, durability, and API parity fixes across all subsystems#1
calebevans merged 9 commits into
mainfrom
bug-fixes

Conversation

@calebevans

Copy link
Copy Markdown
Owner
  • FSRS decay: implement post-lapse stability formula (W11-W14) for quality=1, separate raw strength from effective retrievability, strip content on phase transitions, persist ghost bridge edges
  • Graph: fix 2-hop connection bonus double-counting, reorder edge persistence to validate-then-persist, fix ghost bridge bidirectional check
  • Storage: make PhaseIndex namespace-aware, two-phase crash-safe text compaction, fsync before meta.db commit, RwLock poison recovery
  • Embedding: fix PrefixedProvider.embed_query delegation, add OpenAI network retry, validate batch counts in all providers
  • HTTP API: wire topics/emotions/time range/entities through search, use namespace initial_stability, add decayRateMultiplier to create_namespace, fix delete TOCTOU race
  • Docs: fix tool count (9→10), timestamp format, vectors.dat ne

- Implement FSRS v4.5 post-lapse stability formula (W11-W14) for quality=1
  reinforcement, replacing the incorrect multiplicative penalty
- Separate raw retrievability (strength) from effective retrievability
  with connection bonus (decay_strength) in sweep updates
- Persist ghost bridge edges to EdgeStore during ghost→deleted transitions
- Strip full_text from storage during Full→Summary phase transitions
- Clear summary field during Summary→Ghost phase transitions
- Add execute_sweep_at() for testing with deterministic timestamps
- Fix 2-hop connection_bonus double-counting nodes already reached at 1-hop
  by deduplicating with a HashSet and keeping max contribution per node
- Reorder persist_edges to validate in-memory graph FIRST, then persist
  only accepted edges, preventing TOCTOU race on restart
- Fix ghost bridge edge-existence check to inspect both directions using
  has_typed_edge_between instead of forward-only check
- Log edge count update failures instead of silently discarding with let _
- Remove dead code: AutoLinkThresholds, remove_node, remove_edge,
  get_outgoing_of_type, edge_exists_between_keys
- Make PhaseIndex namespace-aware to prevent cross-namespace bitmap
  collisions when multiple namespaces share vector slot numbers
- Implement two-phase text compaction with crash recovery: write new
  file, commit meta.db offsets, then atomic rename with marker files
- Fsync vector and text data before meta.db commit in insert_memory
  to prevent stale data after power loss
- Add strip_full_text and strip_summary to StorageEngine trait for
  phase transition content removal
- Replace RwLock unwrap() with poison recovery (unwrap_or_else) across
  9 call sites in metadata.rs
- Add update_decay_state decay_strength parameter to separate raw
  from effective retrievability
- Fix PrefixedProvider.embed_query to delegate to inner.embed_query()
  instead of inner.embed(), which broke asymmetric embedding models
- Add exponential backoff retry for OpenAI network-level transport
  errors (connect failures, timeouts, DNS)
- Validate embedding count matches input count in all providers
  (Ollama, OpenAI, Bedrock, CachedProvider) to prevent silent
  data corruption and panics
- Remove dead code: OllamaProvider::list_models and associated types
- Pass topics and emotions through search as topic/ and emotion/ tags,
  matching MCP bridge_adapters.rs behavior
- Use namespace-configured initial_stability instead of hardcoded 3.7
- Add decayRateMultiplier parameter to create_namespace endpoint
- Fix delete_memory TOCTOU race by performing read+tombstone+free
  atomically under a single write lock
- Wire FTS index, entity index, and full search filter pipeline through
  to HTTP API search endpoint (namespace, time range, min_strength,
  tag filtering, graph depth)
- Add list_memories_filtered with tag and time range support
- Enrich RelationshipGraphAdapter with vector index, entity index, and
  config for neighbor/similar endpoint support
- Add FsrsEngine namespace decay_rate_multiplier support
- Remove unused embedding field from StorageEngineAdapter
- Remove unused CreateMemory struct and its validation logic
- Remove unused CachedRecord::to_memory method
- Remove unused Tag::from_trusted constructor
- Remove unused RecalldError::status_code and is_retryable methods
- Update ValidationError doc comment to not reference removed struct
- Preserve StorageError type information in warming_adapters instead
  of converting to opaque anyhow strings
- Update MCP tool count from 9 to 10 (namespace_stats was missing)
- Add namespace_stats to permissions allowlist in README and mcp.md
- Document namespace_stats tool parameters in guide.md
- Fix timestamp format in MCP response examples: epoch milliseconds
  → ISO 8601 strings to match actual output
- Fix find_similar_memories scan mode response structure in mcp.md
- Update architecture.md: vectors.dat → <ns>/vectors.dat per-namespace
- Add decayRateMultiplier to create_namespace docs in guide.md
- Fix create_namespace initialStability default: 3.7 → 3.7145
- Add detailed system prompt with step-by-step reasoning instructions,
  qualifier verification, semantic matching, and list-scanning guidance
- Add followup query support for iterative retrieval refinement
- Improve temporal reasoning with pre-computed time deltas
- Add graph neighbor context integration in answer generation
- Enhance LoCoMo benchmark with parallel evaluation and stress test mode
@calebevans calebevans self-assigned this Jul 15, 2026
@calebevans calebevans added the bug Something isn't working label Jul 15, 2026
@calebevans
calebevans merged commit f0c9f1d into main Jul 15, 2026
6 checks passed
@calebevans
calebevans deleted the bug-fixes branch July 15, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant