Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: The short-term summary does not track which episodes it covers: deleted episodes stay in it, and a failed summarization drops its batch

未关闭
#1,884 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
ai, backend

调研方向

Start with packages/server/src/memmachine_server/episodic_memory/short_term_memory/short_term_memory.py, especially the cited queueing, deletion, persistence, and summarization paths at the supplied revision. Trace how episode identifiers and pending batches move through those paths, then inspect the related tests for short-term memory and episode deletion. Done means deleting an episode removes its contribution from the in-memory and persisted summary, and a failed summarization leaves its batch available for a later attempt.

由索引模型根据 Issue 内容生成。

描述

What happened

Paths are under packages/server/src/memmachine_server/episodic_memory/short_term_memory/; line numbers are at 805ea21 (head of feat/horizontal-scaling).

Short-term memory keeps a buffer of recent episodes and a running summary of older ones. When the buffer is full, its episodes are queued for summarization (short_term_memory.py:521), and queued episodes are removed from the buffer as new ones arrive (:232-234), whether or not their summarization succeeded. The summary is free text with no record of which episodes it covers, and the consolidator's docstring promises that "the summary will eventually reflect all ingested episodes" (:480-481).

Deleting an episode leaves its content in the summary. delete_episode removes the episode from the buffer only (:268-279). Once an episode has been summarized, the summary keeps its content, in memory and in the persisted copy (save_short_term_memory, :642), and once it has also left the buffer, delete_episode does not find it at all. Every later search in the session returns that summary. #1720 clears the summary when the whole short-term memory is cleared; deleting single episodes (POST /api/v2/memories/episodic/delete) is not covered.

A failed summarization drops its batch. The worker takes the whole pending batch off the queue before summarizing it (:536-537). The model call makes one attempt (:633-636; generate_response defaults to max_attempts=1). Any error other than a recognized context-length error is logged and the previous summary is kept (:674-679). After a rate limit, a timeout, or a server error from the model, that batch is no longer queued, its episodes leave the buffer as new ones arrive, and they never reach the summary.

Not reproduced; follows from the code above.

Expected
  • Deleting an episode removes its content from the short-term summary, in memory and in storage.
  • A batch whose summarization fails is summarized later, or stays available, rather than dropped.
Notes

#1719 (open PR #1720) covers the summary surviving a reset and cancellation during summarization. Context-length errors that are not recognized on some providers, which also drop the batch, are #1879.

Related: #1719, #1720, #1748, #1879.


🤖 Written by Claude Code (Claude Opus 5.5) on behalf of @edwinyyyu.

主要语言
Python
星标
3.1k
派生
217
平均合并
4 天 15 小时
30 天内合并 PR
21

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MemMachine/MemMachine 的其他 Issue

查看 MemMachine/MemMachine 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。