statechart: relative-symlink launcher test fails on macOS because /var is a symlink
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- macos, node.js, typescript
调研方向
失败的用例是 pstack/skills/statechart/scripts/test/cli.test.ts 中名为 'the launcher reached through an absolute and a relative symlink' 的测试,位于第 135 行附近。阅读在 os.tmpdir() 下创建链接的 linkedLauncher 辅助函数,以及构建相对目标的 path.relative 调用。在 macOS 上使用 --test-name-pattern 过滤器运行该测试。当在构建相对链接之前用 realpath 解析临时目录,并且该测试在 macOS 和 Linux 上都通过时,即为完成。
由索引模型根据 Issue 内容生成。
描述
On macOS, the launcher reached through an absolute and a relative symlink writes the committed chart on this Node in pstack/skills/statechart/scripts/test/cli.test.ts fails. The test before it, which reaches the launcher by its own path, passes.
$ node --disable-warning=ExperimentalWarning --test --test-name-pattern="launcher reached" test/cli.test.ts
✔ the launcher reached by its own path writes the committed chart on this Node
✖ the launcher reached through an absolute and a relative symlink writes the committed chart on this Node
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
undefined !== ''
at cli.test.ts:135:12
Node v26.13.0, macOS. The scripts are copied verbatim from ae5650f.
Cause. linkedLauncher creates its links under os.tmpdir(), which is /var/folders/... on macOS. /var is a symlink to /private/var. path.relative(second, launcher) computes the relative target lexically from /var/folders/.../b. The kernel resolves the link's .. segments from the physical directory, /private/var/folders/.../b, which is one level deeper, so the relative link points at a path that doesn't exist and the spawn fails.
Possible fix. Resolve the temp directory before building the relative link, for example fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), "statechart-links-")).
- 主要语言
- TypeScript
- 星标
- 14.9k
- 派生
- 1.5k
- 平均合并
- 3 小时 23 分钟
- 30 天内合并 PR
- 143
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cursor/plugins 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
pstack statechart: strict typecheck reports four errors in run.ts and CLI tests可能已有人在做 @surlymochan 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 2 天内回复
-
desktop: pasted image breaks and send fails with "Failed to fetch" after the clipboard temp file is deleted可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭reproduced
难度 2/5 1-3 小时 新手友好度 74/100
anomalyco/opencode#62052 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
strapi/design-system#2084 ·
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复