memory: README does not say that unreadable lines are skipped, kept on every write, and fixable only by hand
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 206
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 42/100
modelcontextprotocol/servers#5624 ·
メンテナーはふだん 1 日以内に返信
-
enhancement v2
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
modelcontextprotocol/servers#5611 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/servers の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
hurttlocker/o8#6535 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
area: backend bug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
snapotter-hq/SnapOtter#4856 ·
メンテナーはふだん 1 日以内に返信
-
bug follow-up
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
spellshift/realm#2509 ·
メンテナーはふだん 1 日以内に返信