From ed7fb3c6d98f32c7aa30dedbc47b9ad563d9f815 Mon Sep 17 00:00:00 2001 From: JianFeeeee <109188060+JianFeeeee@users.noreply.github.com> Date: Tue, 29 Sep 2026 17:09:02 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=8E=92=E9=99=A4=20pi-lens=20?= =?UTF-8?q?=E5=AF=B9=20cmd/gui=20=E7=9A=84=20Go=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AF=AF=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 应先确认目录内存在该语言的源文件,再决定是否执行。 --- .pi-lens.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .pi-lens.json diff --git a/.pi-lens.json b/.pi-lens.json new file mode 100644 index 00000000..82e293d3 --- /dev/null +++ b/.pi-lens.json @@ -0,0 +1,14 @@ +{ + "_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/**" + ] +}