Skip to content

fix(memory,context,eviction): resolve critical TODOs#3534

Merged
bug-ops merged 2 commits intomainfrom
todo-critical-fixes
Apr 27, 2026
Merged

fix(memory,context,eviction): resolve critical TODOs#3534
bug-ops merged 2 commits intomainfrom
todo-critical-fixes

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 27, 2026

Summary

  • Remove dead unimplemented!() stubContextService::rebuild_system_prompt had zero callers and panicked unconditionally; deleted
  • Fix proactive compression pathmaybe_proactive_compress now loads compression_guidelines from SQLite and passes them to the summarization view, matching the reactive path; Closes maybe_proactive_compress does not populate compression_guidelines in ContextSummarizationView #3533
  • Wire Qdrant vector deletion in eviction phase 2start_eviction_loop accepts Option<Arc<EmbeddingStore>>; vectors are deleted before rows are marked clean (crash-safe); runner.rs threads the embedding store through
  • Clean up stale TODO comment in SubagentManager::spawn_subagent — replaced with accurate map of three existing enforcement sites

Test plan

Follow-up issues (non-blocking, filed separately)

  • Chunk delete_by_message_ids IN-clause at ~490 IDs to match phase-1 pattern (SQLite 999-var ceiling)
  • Periodic Qdrant↔SQLite reconciliation sweep for pre-existing orphaned vectors
  • Update crates/zeph-agent-context/README.md lines 33 and 64 to remove stale rebuild_system_prompt references

…t cleanup, proactive compression guidelines, dead stub removal

- Remove unimplemented!() stub ContextService::rebuild_system_prompt (dead code,
  zero callers; real impl lives on Agent<C>)
- Fix proactive compression path to load and pass compression_guidelines via
  load_compression_guidelines_for_compact() before constructing ContextSummarizationView;
  closes #3533
- Wire Qdrant vector deletion in eviction phase 2: start_eviction_loop now accepts
  Option<Arc<EmbeddingStore>>; run_eviction_phase2 calls delete_by_message_ids before
  mark_qdrant_cleaned (crash-safe order); runner.rs threads embedding store through
- Add EmbeddingStore::delete_by_message_ids with supporting tests
- Replace stale TODO comment in SubagentManager::spawn_subagent with accurate map
  of three existing permission-enforcement sites
- Add compression_guidelines_flow_through_proactive_compress_path test verifying
  the full SQLite → load → view → LLM-prompt data-flow for issue #3533
@github-actions github-actions Bot added documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate bug Something isn't working size/XL Extra large PR (500+ lines) labels Apr 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 27, 2026 23:46
@bug-ops bug-ops merged commit f4c7ba2 into main Apr 27, 2026
32 checks passed
@bug-ops bug-ops deleted the todo-critical-fixes branch April 27, 2026 23:58
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 memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

maybe_proactive_compress does not populate compression_guidelines in ContextSummarizationView

1 participant