Files
HomeAgent/.pi-lens.json
JianFeeeee 8b8199592d chore: 排除 pi-lens 对 cmd/gui 的 Go 测试误报
cmd/gui 是纯 Electron/Node 目录:0 个 .go 文件、无 go.mod、`go list ./...`
匹配 0 个包,它的测试入口是 package.json 里的 `node *.test.mjs`。

但 pi-lens 的 test runner 在写文件时按**仓库主语言**(Go)为所在目录跑测试,
而 cmd/gui/*.test.mjs 被识别成测试文件 ⇒ 它对一个纯 Node 目录执行
`go test ./cmd/gui`,必然得到 `no Go files ... [setup failed]`,
却被报成「测试失败」。本会话内重复触发 13 次,每次都要人工复核一遍。

排除触发源(而非关闭 tests.enabled —— 那是**全局**开关,会一起削弱所有真实
项目的测试网)。.mjs 的真实运行方式是 `npm test`,CI 的 GUI job 已在跑。

上游缺陷:runner 应先确认目录内存在该语言的源文件,再决定是否执行。
2026-09-29 17:09:02 +08:00

15 lines
988 B
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"_comment": "pi-lens 仓库级配置。cmd/gui 的 test 排除原因见 docs/zh/ci-cd-runbook.md「诊断噪音」一节。",
"_why_cmd_gui_tests_excluded": "cmd/gui 是纯 Electron/Node 目录(0 个 .go 文件、无 go.mod)。pi-lens 的 test runner 在写文件时按仓库主语言(Go)为目录跑测试,而 cmd/gui/*.test.mjs 被识别成测试文件 ⇒ 它对一个纯 Node 目录执行 `go test ./cmd/gui`,必然得到 `no Go files ... [setup failed]`,却被报成「测试失败」。这些 .mjs 的真实运行方式是 `npm test`(CI 的 GUI job 已在跑),pi-lens 无法正确执行它们,故排除触发源。上游缺陷:runner 应先确认目录内有该语言的源文件。",
"ignore": [
"cmd/gui/node_modules/**",
"cmd/gui/**/*.test.mjs",
".npm-cache/**",
"build/**",
"dist/**",
"third_party/homeagent-sdk/site_build/**",
"third_party/homeagent-sdk/build/**",
"third_party/homeagent-sdk/.npm-cache/**"
]
}