Skip to content

feat(memory): Acon guidelines provider, session digest, crossover context strategy#2309

Merged
bug-ops merged 1 commit intomainfrom
acon-failure-driven-compressio
Mar 27, 2026
Merged

feat(memory): Acon guidelines provider, session digest, crossover context strategy#2309
bug-ops merged 1 commit intomainfrom
acon-failure-driven-compressio

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

Test plan

  • cargo +nightly fmt --check passes
  • cargo clippy --workspace --features full -- -D warnings passes
  • cargo nextest run --workspace --features full --lib --bins — 6853 passed, 22 skipped
  • Migration 046 uses ON CONFLICT DO UPDATE (not INSERT OR REPLACE) — row ID stable across upserts
  • MemoryFirst drain runs before memory message insertion in assembly.rs
  • redact_sensitive() called on digest before SQLite bind in session_digest.rs

Closes #2201, #2289, #2288

…text strategy (#2201, #2289, #2288)

Add three memory enhancements to zeph-memory and zeph-core:

- guidelines_provider field in CompressionGuidelinesConfig wires the ACON
  guidelines updater to a named [[llm.providers]] entry; falls back to primary
  when empty (#2201)

- Session digest: SQLite migration 046 adds session_digest table (one row per
  conversation, upsert via ON CONFLICT DO UPDATE); LLM-based distillation runs
  at session shutdown and persists key facts + outcomes; digest is injected at
  context assembly as a fixed top-of-context block before per-turn memory slots;
  redact_sensitive() applied before storage; config via [memory.digest] block
  (enabled, provider, max_tokens, max_input_messages); TUI spinner shown during
  generation (#2289)

- Crossover context strategy: ContextStrategy enum (full_history | memory_first
  | adaptive) added to MemoryConfig; allocate_with_opts() deducts digest tokens
  before percentage splits; memory_first mode drains conversation history first
  then inserts memory messages; adaptive switches at crossover_turn_threshold
  turns (default 20); config via context_strategy and crossover_turn_threshold
  fields in [memory] (#2288)

Closes #2201, #2289, #2288
@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 enhancement New feature or request size/XL Extra large PR (500+ lines) labels Mar 27, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 27, 2026 23:47
@bug-ops bug-ops merged commit dd53035 into main Mar 27, 2026
25 checks passed
@bug-ops bug-ops deleted the acon-failure-driven-compressio branch March 27, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

1 participant