Skip to content

bug(memory): semantic ranking options (temporal decay, MMR) not wired from config #1668

@bug-ops

Description

@bug-ops

Summary

SemanticMemory::with_ranking_options() is never called in AppBuilder::build_memory(). The config values temporal_decay_enabled, temporal_decay_half_life_days, mmr_enabled, and mmr_lambda from [memory.semantic] are parsed into SemanticConfig but never applied to the SemanticMemory struct. Both features are silently disabled regardless of config.

Root Cause

crates/zeph-core/src/bootstrap/mod.rs build_memory():

// After creating memory via SemanticMemory::with_sqlite_backend_and_pool_size() or
// SemanticMemory::with_qdrant_ops(), the builder is returned without calling:
// .with_ranking_options(
//     config.memory.semantic.temporal_decay_enabled,
//     config.memory.semantic.temporal_decay_half_life_days,
//     config.memory.semantic.mmr_enabled,
//     config.memory.semantic.mmr_lambda,
// )

The method exists in zeph-memory/src/semantic.rs:339 but is not used in the bootstrap path.

Impact

All documented config options in [memory.semantic] for ranking are dead.

Fix

Add to build_memory() after memory construction:

memory = memory.with_ranking_options(
    self.config.memory.semantic.temporal_decay_enabled,
    self.config.memory.semantic.temporal_decay_half_life_days,
    self.config.memory.semantic.mmr_enabled,
    self.config.memory.semantic.mmr_lambda,
);

Severity: High

Config docs claim these are working features. This is a silent misconfiguration affecting all deployments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmemoryzeph-memory crate (SQLite)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions