memory: README does not say that unreadable lines are skipped, kept on every write, and fixable only by hand
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 90/100
- Issue 類型
- 文件
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
研究方向
搭配閱讀 src/memory/README.md、src/memory/index.ts 中的 loadGraphWithUnreadable 和 saveGraph,以確認文件所述行為。在儲存或疑難排解部分附近新增一段簡短說明,涵蓋遭略過並記錄的行、寫入時的保留行為和位元組限制、工具的限制,以及手動修復。README 說明了所述行為和復原步驟後,即為完成。
由索引模型根據 Issue 內容生成。
描述
Which server?
memory (@modelcontextprotocol/server-memory), src/memory/README.md.
The problem
The README does not say what the server does with a line of the memory file it cannot read, or how to fix one. The only mention is in passing, under the write limits ("MEMORY_MAX_FILE_BYTES counts the bytes of the file as it would be saved, unreadable lines included").
What the server does today (loadGraphWithUnreadable and saveGraph in src/memory/index.ts, from #4885):
- A line that is not JSON, is not an object, has an unknown
type, or fails the entity or relation schema (an entity with noentityType, an observation that is not a string, a relation with norelationType) is left out of the graph. Each skipped line is logged to stderr ("Skipping invalid entity in memory file: …"). - Every save writes those lines back unchanged, after the graph's own lines, so a write never drops data it could not read.
- No tool can then remove or repair such a line.
read_graph,search_nodesandopen_nodesdo not show it;delete_entitiesanddelete_observationsreport its name as not found;add_observationsandcreate_relationsfail with "Entity with name … not found";create_entitiesunder the same name stores a second record beside the invalid line; an invalid relation matches nodelete_relationscall and stays after the entities it names are deleted. #5541 pins this insrc/memory/__tests__/invalid-record-removal.test.ts.
So the only remedy is to edit the file by hand, and a user who sees the stderr line, or a Not found for an entity they can see in the file, has nowhere to read that.
Expected
A short passage in the README (near the storage or troubleshooting sections) stating: which lines are skipped, that they are logged to stderr, that they are kept in the file on every write and count toward MEMORY_MAX_FILE_BYTES, that no tool reaches them, and that the fix is to stop the clients using the file and correct or delete the line in a text editor.
Scope
Documentation only. Whether a remediation tool should exist is a separate question this issue does not ask.
Found while verifying #5541.
- 主要語言
- TypeScript
- 星號
- 92k
- 分支
- 12k
- 平均合併
- 3 小時 46 分鐘
- 30 天內合併 PR
- 206
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
modelcontextprotocol/servers 的其他 Issue
-
`interface-diff` discards the git error when resolving its default base and reports the wrong cause未關閉
難度 2/5 1-3 小時 新手友好度 82/100
modelcontextprotocol/servers#5636 ·
維護者通常 1 天內回覆
-
chore server-memory v2
難度 2/5 1-3 小時 新手友好度 76/100
modelcontextprotocol/servers#5634 ·
維護者通常 1 天內回覆
-
bug server-memory v2
難度 4/5 3-5 天 新手友好度 48/100
modelcontextprotocol/servers#5635 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug server-memory v2
難度 5/5 一週以上 新手友好度 42/100
modelcontextprotocol/servers#5624 ·
維護者通常 1 天內回覆
-
enhancement v2
難度 4/5 3-5 天 新手友好度 48/100
modelcontextprotocol/servers#5611 ·
維護者通常 1 天內回覆
查看 modelcontextprotocol/servers 的全部 Issue
相似的 Issue
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
難度 2/5 1-3 小時 新手友好度 72/100
elastic/kibana#306401 · 3 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
agentes-chat/agentes-chat#927 ·
維護者通常 1 天內回覆
-
comp/desktop P2 type/bug
難度 2/5 1-3 小時 新手友好度 78/100
NousResearch/hermes-agent#157702 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
e2e-failure ready-to-code
難度 1/5 1 小時以內 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4794 · 1 則留言 ·
維護者通常 1 天內回覆