Skip to content

feat(memory): message dual-visibility metadata system (M28)#818

Merged
bug-ops merged 3 commits intomainfrom
m28-message-visibility
Feb 24, 2026
Merged

feat(memory): message dual-visibility metadata system (M28)#818
bug-ops merged 3 commits intomainfrom
m28-message-visibility

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 24, 2026

Summary

  • Add MessageMetadata with agent_visible/user_visible flags to every Message in zeph-llm
  • Compacted messages marked agent_visible=false (hidden from LLM), user_visible=true (preserved for UI/TUI)
  • Summary messages inserted as agent_only (visible to LLM, hidden from user)
  • replace_conversation() for atomic durable compaction in SQLite
  • load_history_filtered() for visibility-aware history loading
  • Semantic recall and keyword search respect visibility boundaries
  • SQLite migration 014 adds visibility columns + conversation_id index

Closes #790, closes #799, closes #800, closes #801, closes #802, closes #803

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace -- -D warnings — 0 warnings
  • cargo nextest run --workspace --lib --bins — 2590/2590 passed
  • MessageMetadata serde round-trip and backward compat tests
  • save_message_with_metadata persists visibility flags
  • load_history_filtered filters by agent_visible / user_visible
  • replace_conversation atomicity: originals marked user_only, summary agent_only
  • messages_by_ids and keyword_search filter by agent_visible=1
  • message_by_id reads visibility columns from DB

@github-actions github-actions bot added documentation Improvements or additions to documentation llm LLM provider related memory Persistence and memory rust core enhancement New feature or request size/XL labels Feb 24, 2026
Add MessageMetadata with agent_visible/user_visible flags to Message.
Compacted messages are marked agent_visible=false (hidden from LLM)
while remaining user_visible=true (preserved for UI/TUI history).
SQLite migration adds visibility columns with index on conversation_id.
Semantic recall and keyword search now respect visibility boundaries.
replace_conversation() persists compaction atomically.
@bug-ops bug-ops force-pushed the m28-message-visibility branch from c120b13 to 4fa2e1f Compare February 24, 2026 16:51
@bug-ops bug-ops enabled auto-merge (squash) February 24, 2026 16:52
@bug-ops bug-ops merged commit 6eb0f48 into main Feb 24, 2026
26 checks passed
@bug-ops bug-ops deleted the m28-message-visibility branch February 24, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core documentation Improvements or additions to documentation enhancement New feature or request llm LLM provider related memory Persistence and memory rust size/XL

Projects

None yet

1 participant