Skip to content

fix(memory): TopologyOp::Update ignores target_id — deduplicate from Merge logic #2364

@bug-ops

Description

@bug-ops

Context

In crates/zeph-memory/src/consolidation.rs, TopologyOp::Update { source_id, new_content, confidence } is supposed to update a single message's content in place (for outdated/corrected facts). However, the LLM is currently given a choice between Merge and Update, but the DB application path for Update behaves identically to a Merge on a single source.

Impact

The LLM is making a false choice — Update produces the same result as Merge with one source. This wastes tokens and may confuse the model.

Fix

Either:
a) Make Update actually do an in-place content UPDATE on the source row (instead of inserting a new consolidated row), or
b) Remove Update from the prompt and drop it from TopologyOp until the distinction is meaningful

Option (a) is preferred to unlock in-place correction semantics.

Discovered in PR #2358 impl-critic review (CONCERN-02).

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexitymemoryzeph-memory crate (SQLite)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions