[vika][REG-03][P2] Windows 测试套件未按平台门控,33 个 POSIX-only 用例失败
环境
feat/vika主线,Windows 真机(Windows 11 x64,Node v24.19.0)
现象
Windows 上跑 node --test packages/daemon/test/*.test.mjs …:
166 tests → 130 pass / 33 fail / 3 skip
33 个失败逐项核对后全部是 POSIX-only 夹具或断言,不是产品缺陷:
- 10 ×
process-utils:依赖/bin/sh不存在 - 13 ×
actions+ 1 ×lark:mkdtemp既有目录触发私密临时目录 ACL 拒绝(产品只对自建目录收紧,行为正确) - 2 ×
actions+ 2 ×connector-supervision+ 1 ×durable:硬编码<dir>/actions.sock(产品实际走 Windows 命名管道\\.\pipe\vika-actions-<hash>) - 1 ×
durable:assert bash 工具(Windows 只有 PowerShell 工具) - 1 ×
durable:assert:PATH 分隔符(Windows 正确输出;) - 2 ×
lark:正斜杠路径正则(Windows 正确输出反斜杠)
windows-*.test.mjs 原生测试全部通过(e.g. windows-action-api 1/1、windows-coding-tools 2/2)。
期望
给这些 POSIX-only 用例加 process.platform 门控(win32 下 skip),并提供 Windows 原生等价用例;避免真机测试结果被误读为产品失败。
相关位置
packages/daemon/test/下上述文件- 验收证据:
AgentsDo/vika-win-acceptance-20261108/evidence/reg/REG-03.json(含逐项分类与原始输出)
这份统计需要先绑定验收的 source commit 和完整测试命令,再决定哪些用例应跳过。我核对了当前上游,发现版本边界与 issue 中的描述不一致:
- 当前
feat/vika是a6c43c131,尚未包含platform.mjs或windows-*.test.mjs。Windows 适配仍在开放的 #7178,当前 head 为21ef6630。 - #7178 经维护者要求缩减后的
WINDOWS.md明确要求 Git Bash,并保留 Pi/Durable 的 Bash 工具,已移除 PowerShell 工具替换。因此对这个版本,assert bash不能直接归类为应跳过的 POSIX-only 断言。 - 该 head 的
private-temp.mjs仅在 Windows 跳过 Unix mode-bit 检查,没有 Windows ACL 实现。“既有目录触发 ACL 拒绝”和windows-action-api/windows-coding-tools的通过结果不能直接用于验证这个缩减后的 head。
有些失败适合修正夹具以保留跨平台覆盖,而非整体 skip:action API 的集成夹具可复用 #7178 的 localSocketPath() 选择 socket/命名管道;PATH 断言可使用 path.delimiter;Lark 本地路径断言可使用 path.join()。实际依赖 /bin/sh 或 POSIX 进程组的用例再单独门控或使用明确的 Git Bash 前提。这样不会把消息、工具调用和 connector 的公共合约一起跳过。
我下载并原样运行了 21ef6630 的 platform.mjs + platform.test.mjs:macOS、Node v26.13.0 下 6 passed / 1 Windows-only skipped。这只验证该模块的现有合约,不是 Windows 验收,也未证明本 issue 的 33 个失败已解决。若补充上述 source commit 与原始命令,就能把剩余夹具修复准确落到对应版本,避免把较大 fork preview 的结果混入当前上游方案。
以上源码核对与本地验证完全由 AI agent 完成,无人工参与。
A newer native Windows acceptance run on downstream vika-winfirst@322518384bce64136def93bb6db5cc7439fa36de expands this finding: normal npm test did not exit after 29 minutes; a diagnostic run with --test-force-exit reported 1297 tests, 1023 pass, 265 fail, 9 skip. Forced exit is not a passing normal run.
Reviewed the sanitized failure log. Categories include Unix actions.sock fixtures, fake child processes that cannot respond to Windows taskkill, POSIX shebang executables, chmod assertions, non-elevated symlinks, release/updater fixtures outside the Windows preview's supported scope, and cleanup failures. It is not safe to label every failure POSIX-only: config.mjs's relative CLI path resolution and Lark frozen card image path validation also reveal product defects.
The downstream candidate uses platform.localSocketPath in shared integration/MCP fixtures, keeps upload assertions while limiting mode-bit assertions to POSIX, makes npm run check a Node script, and bounds a stuck test run with an explicit failing timeout (not --test-force-exit and not a blanket Windows skip). The full Windows suite is still pending rerun; do not close this issue or claim the 265 failures are resolved based on Linux tests.
Deployment/evidence summary: https://github.com/openviking-superagent/OpenViking/issues/16 . Real-host report supplied by the tester; no credentials or raw logs published.
已把新报告与上游版本对应起来:322518384 的直接父提交是上游 feat/vika@36d7c8d9,该提交修改的是下游 PowerShell/Durable 工具及文档,没有包含 #7222。因此这里的 1297 项 / 265 失败属于该下游版本,尚不能作为 #7222 的验收结果。
我已将 #7222 更新到 a46f07603ee77204022fbb34fb26f657fe553fc7,补齐这次核对发现的三个现有夹具文件:
- MCP transport 与 Pi MCP 集成测试也使用生产
localSocketPath(),保留真实 stdio/HTTP 工具调用、并发和取消检查。 - 卡片图片上传只在支持的平台断言 Unix mode bits;路径逃逸用目录 symlink/junction 继续验证,避免 Windows 文件 symlink 的提权要求。上传、失败恢复、清理和路径边界断言仍保留。
这三个文件在 macOS / Node v26.13.0 下 53 passed / 0 failed / 0 skipped,正常退出;npm run check、语法与 diff 检查通过。此前 1283 passed / 9 skipped 的完整套件结果对应旧 head e40ac54e,本次没有重复运行全套,也没有原生 Windows 结果。
下一次 Windows 重跑请附 实际 source commit、完整正常测试命令(包括额外 Node/npm flags、script-shell 设置或下游合并记录),以及脱敏后的剩余失败用例/错误和是否正常退出。可以测试 #7222 的上述 head;若保留下游 PowerShell 改动,请记录组合后的实际提交,方便区分两者。正常 npm test 若仍挂起,应记录等待时间及失败超时,不能用 --test-force-exit 的完成代替正常退出。
#7233 的 CLI 相对路径和 frozen card 图片路径仍属独立产品缺陷;本 PR 保留会暴露它们的行为检查。npm run check 的 Windows shell 问题、进程假对象及其余夹具也尚未全部处理。#7207 应保持开放,当前没有证据表明 265 项失败或挂起已解决。
本次源码核对、修改与本地验证完全由 AI agent 完成,无人工参与。
#7222 已更新到 e875e8956c82520a596dbdf4198ed957144ae948,基于当前上游 feat/vika@0a85df7dd:
npm run check改为 Node 入口,Windows 分支检查 JavaScript,POSIX 主机另外执行sh -n;不再要求 npm 使用 POSIX shell。检查范围、非零退出、启动错误、信号退出和缺失文件组均有本地对照验证。- 撤回了之前放宽 Lark 视频封面路径断言的改动,继续要求 slash-based CLI 路径;#7233 的产品路径修复单独放在 #7243。
macOS / Node v26.13.0 的完整 npm test 正常退出:1297 项,1286 passed / 11 skipped / 0 failed;跳过项是 8 个 Windows 用例、1 个 opt-in 真实 OV 用例和 2 个未安装 CLI 二进制检查。npm run check 检查 178 个 JavaScript 和 2 个 shell 文件并通过,检查入口的 10 个分支/失败场景也通过。
这不是原生 Windows 验收。 Windows/npm cmd.exe 仍待实际运行,265 项失败和挂起没有被证明解决。重跑请记录本 PR head 或与 #7243 组合后的实际 SHA、正常 npm test 命令及退出情况;请继续保留本 issue。源码修改与本地验证均为 AI-only,无人工参与。
Closing as fixed on feat/vika by #7222 (portable validation commands and test fixtures) and #7243 (Windows path normalization). Reopen with a fresh native Windows run on current feat/vika if POSIX-only cases still fail.