Skip to content

fix(memory): sync session summaries to Qdrant on compact_context happy path#1915

Merged
bug-ops merged 4 commits intomainfrom
1911-summary-qdrant-sync
Mar 16, 2026
Merged

fix(memory): sync session summaries to Qdrant on compact_context happy path#1915
bug-ops merged 4 commits intomainfrom
1911-summary-qdrant-sync

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 16, 2026

Summary

  • compact_context() and compact_context_with_budget() called replace_conversation() on success but never called store_session_summary(), leaving zeph_session_summaries Qdrant collection permanently at 0 points
  • Added store_session_summary() call chained after replace_conversation() in both variants, mirroring existing fallback branches; Qdrant failure is non-fatal (warn + continue)
  • Added test_compact_context_calls_replace_conversation to verify the happy-path branch is exercised via SQLite-side assertion

Root cause

The Qdrant upsert was only called in the two fallback branches (Ok(_) with < 2 IDs or Err). In normal sessions the happy path (ids.len() >= 2) is always taken — no upsert ever fired.

Test plan

  • cargo +nightly fmt --check — passes
  • cargo clippy --workspace --features full -- -D warnings — 0 warnings
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 6043 passed
  • New test test_compact_context_calls_replace_conversation confirms happy-path branch is reached
  • Live session test: run agent with summarization threshold, verify zeph_session_summaries point count increases after compaction

Closes #1911

@github-actions github-actions bot added bug Something isn't working documentation Improvements or additions to documentation size/M Medium PR (51-200 lines) rust Rust code changes core zeph-core crate and removed bug Something isn't working labels Mar 16, 2026
@github-actions github-actions bot added the bug Something isn't working label Mar 16, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 16, 2026 15:50
bug-ops added 2 commits March 16, 2026 16:57
…y path (#1911)

The happy-path branch of compact_context() and compact_context_with_budget()
called replace_conversation() on success but never called store_session_summary(),
leaving zeph_session_summaries Qdrant collection permanently empty.

Add store_session_summary() call chained after replace_conversation() in both
variants, mirroring the existing fallback branches. Qdrant failure is non-fatal
— a warning is logged and execution continues normally.

Also add test_compact_context_calls_replace_conversation to verify the happy-path
branch is exercised (SQLite-side assertion, strongest proxy without Qdrant mock).

Closes #1911
@bug-ops bug-ops force-pushed the 1911-summary-qdrant-sync branch from 499a465 to a27e9fe Compare March 16, 2026 15:57
bug-ops added 2 commits March 16, 2026 17:12
…otstrap paths (#1914)

AgentBuilder::with_focus_config() and AgentBuilder::with_sidequest_config()
were never called from bootstrap, so [agent.focus] and [memory.sidequest]
config sections were silently ignored (always defaulting to enabled=false).

Wire both calls in runner.rs, daemon.rs, and acp.rs (SharedAgentDeps gains
focus_config and sidequest_config fields).

Closes #1907
@bug-ops bug-ops merged commit 2f0375a into main Mar 16, 2026
20 checks passed
@bug-ops bug-ops deleted the 1911-summary-qdrant-sync branch March 16, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(memory): zeph_session_summaries Qdrant collection always empty — session summaries not synced to vector store

1 participant