memory: persistence EISDIR test fails on Node 26.7 (the path suffix depends on the Node minor, not the major)
维护者通常 1 天内回复
@ace-ify 已经在做这个了。
开始于 2026年10月19日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 83/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
- 领域
- testing
调研方向
阅读 src/memory/__tests__/persistence.test.ts,尤其是测试 "reports a graph file that cannot be read as a tool error",以及 #5076 引入的基于版本的预期。运行 npm test -w src/memory -- __tests__/persistence.test.ts,在 Node 26.7 上重现该失败。更新断言,使其接受单独的 EISDIR 消息,或后接文件路径的该消息,然后确认测试通过。
由索引模型根据 Issue 内容生成。
描述
Problem
src/memory/__tests__/persistence.test.ts, "reports a graph file that cannot be read as a tool error", fails again locally, this time on Node 26.7.0 (macOS), so npm run local:gate exits 1 on a machine whose default Node is 26.7:
Expected: "EISDIR: illegal operation on a directory, read '/var/folders/.../memory.jsonl'"
Received: "EISDIR: illegal operation on a directory, read"
#5076 made the expectation follow the Node major: the path appended on >= 26, the bare message before. That matched the Node 26 release #5076 was filed against, but Node 26.7.0 no longer appends the path:
$ node -v && node -e 'require("fs").promises.readFile("/tmp").catch(e=>console.log(e.message))'
v26.7.0
EISDIR: illegal operation on a directory, read
CI's Node 26 leg (#5068) passes on v2/main, so the format differs by Node minor (or platform), not by major. The server is correct on every version: it returns an isError result carrying Node's message. Only the test's expectation is wrong.
Found while running the gate for #5161, on v2/main at 38569bd5.
Reproduce
On Node 26.7.0, on v2/main:
npm ci
npm test -w src/memory -- __tests__/persistence.test.ts
1 failed. Passes on Node 22.
Change
Stop keying the expectation on the Node version. Assert the message is exactly the bare text, or the bare text followed by '<filePath>': for example expect([bare, \${bare} '${filePath}'`]).toContain(textOf(result))`. That still pins the full text the client receives, and holds whichever form the running Node produces.
- 主要语言
- TypeScript
- 星标
- 91.4k
- 派生
- 11.8k
- 平均合并
- 7 小时 36 分钟
- 30 天内合并 PR
- 126
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/servers 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/servers#5216 ·
维护者通常 1 天内回复
-
bug v2
难度 2/5 1-3 小时 新手友好度 79/100
modelcontextprotocol/servers#5215 ·
维护者通常 1 天内回复
-
documentation server-git server-time v2
难度 2/5 1-3 小时 新手友好度 72/100
modelcontextprotocol/servers#5213 · 2 条评论 ·
维护者通常 1 天内回复
-
documentation v2
难度 1/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/servers#5212 · 1 条评论 ·
维护者通常 1 天内回复
-
documentation v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/servers#5211 · 1 条评论 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/servers 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
paperclipai/paperclip#17151 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 83/100
AgoraIO-Extensions/agent-infra#3159 ·
维护者通常 1 天内回复
-
blocklist addition
难度 1/5 1 小时以内 新手友好度 66/100
MetaMask/eth-phishing-detect#304596 ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLite可能已有人在做 @NdekoCode 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
ever-co/ever-gauzy#11214 ·
维护者通常 1 天内回复