test(platform): 修复 macOS 测试基线#527
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
说明
替代 #518。原 PR 的作者分支关闭了 maintainer edit,无法直接补推;本 PR 保留作者原有两笔提交,并追加
f8a484c1修复二审发现的 Linux 测试覆盖回退。改了什么
/etc快照与跨平台 stock-Claude 启动器;Linux 保留真实/etcsnapshot 与 ELF/native launcher 覆盖。skipIf明确标记。/var→/private/var。原因
macOS 基线中的测试覆盖不同边界:VC lifecycle、V3 policy/清理逻辑、npm fixture 和路径投影均可在 macOS 可靠执行,不应整体跳过;只有依赖 Linux 内核隔离能力的用例应明确显示为 skipped。
V2 的
/var与/private/var差异属于同一物理目录的路径别名。使用 canonical containment 既修复合法读取,也收紧了 symlink 越界读取边界。二审指出可移植 helper 原先在 Linux 也无条件替换
process.execPath并冻结/etc,会绕过真实 Linux 生产路径。现在仅在非 Linux 启用这两个 seam。影响面
sandbox: true + Linux + pty/tmux,macOS managed receiver 仍为 fail-close。实际验证
pnpm exec vitest run --project unit test/v3-distillation-runner.test.ts --reporter=dot:33 passed。pnpm build:通过。TZ=Asia/Shanghai pnpm exec vitest run --project unit:2261/2261 suites passed,9426/9426 tests passed。pnpm daemon:restart && pnpm daemon:status:通过,所有进程 online。