memorize(): make delivery resumable per memcell so retries and replays are idempotent
维护者通常 1 天内回复
评估
调研方向
Start with service/memorize.py and service/_boundary.py, then trace markdown entry ID generation and OME dispatch. The issue describes the pending per-memcell delivery state, resume path, deterministic downstream IDs, event deduplication, and retry changes needed. Done means retries resume pending memcells without duplicating entries or events; the suggested boundary-call retry is only a smaller first step.
由索引模型根据 Issue 内容生成。
描述
Why
memorize() is not atomic: boundary detection writes the memcell and consumes
the session buffer, then episode extraction and the OME pipelines run. A
failure after that point cannot be retried safely today:
- re-running an
/addcuts a second memcell from the same messages; - re-running a
/flushfinds an empty buffer and does nothing, leaving the
memcell without its episode.
This is why the async_mode queue (branch feat/memorize-async-mode, PR to follow) ships with max_attempts = 1 and
documents crash recovery as at-least-once. The same limitation applies to
synchronous clients that retry a 5xx.
What the cloud engine does
Replays are idempotent there because three things line up:
- the unit of retry is the memcell, not the add request: the memcell is
persisted with a "not yet dispatched" marker and an orphan re-dispatch
sweep resumes from it instead of re-running boundary detection; - downstream ids are deterministic (
entry_id = <prefix>_<memcell_id>_<subject>_<idx>
with a unique index; cluster ids are hashes), so a replay overwrites
instead of appending; - OME runs at-least-once on top of 1 and 2.
What EverOS would need
- a per-memcell delivery state on
memcell(written with the memcell, cleared
when every pipeline finished) and a resume entry point that runs only the
pipelines for memcells still marked pending; - episode / derived-entry ids derived from the memcell (today
ep_<date>_<seq>),
or a "memcell already has its entry" check in the markdown writer; - OME event dedup keyed by memcell id;
- the queue (and the sync path's error mapping) switched to "retry = resume
pending memcells" instead of "re-run the request".
Touches service/memorize.py, service/_boundary.py, the markdown entry id
scheme and OME dispatch; larger than the queue feature itself, so a separate
change.
Possible first step (small)
Retry only failures that happen before anything is written: wrap the boundary
LLM call (_boundary.py, the _detect call) in a typed error, let the queue
retry only that type (max_attempts back to 3 for it), and map it to 503 on
the sync path. Covers the most common failure (LLM down / rate-limited)
without any duplication risk. Roughly a dozen lines.
- 主要语言
- Python
- 星标
- 13.3k
- 派生
- 926
- 平均合并
- 19 小时 29 分钟
- 30 天内合并 PR
- 43
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
EverMind-AI/EverOS 的其他 Issue
-
难度 2/5 半天 新手友好度 62/100
EverMind-AI/EverOS#414 ·
维护者通常 1 天内回复
-
[Bug]: strict json.loads on lax LLM JSON breaks extraction (trailing commas) and 500s /flush可能已有人在做 @1AbdullahButt 于 1 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 74/100
EverMind-AI/EverOS#564 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
EverMind-AI/EverOS#558 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 67/100
EverMind-AI/EverOS#551 ·
维护者通常 1 天内回复
-
memory: keep a raw input log of /add requests, independent of extraction可能已有人在做 @chuiwenwei 于 1 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 35/100
EverMind-AI/EverOS#537 · 1 条评论 ·
维护者通常 1 天内回复
查看 EverMind-AI/EverOS 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
igormcsouza/tether#278 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 91/100
aws-samples/sample-per-model-bedrock#803 ·
维护者通常 1 天内回复
-
documentation p1
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/accelerate#4511 ·
维护者通常 1 天内回复
-
follow-up
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复