Pull Request已成功合入, 合并人@CANN-robot
(感谢 guanxinghua 的贡献)Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/cannbot-sentry | ✅ qwren, hangdu (2/2) | ✅ qwren (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
guanxinghua, thanks for your pull request. All authors of the commits have signed the CLA. 👍


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


vitest 覆盖率默认 reportOnFailure: false:只要 run 里有失败用例,整个报告(text-summary / lcov / html)都不会产出(本机实测:3 个用例失败时开头打了 "Coverage enabled with v8",但 coverage/ 目录不生成)。这行明细提示是无条件打印的,失败 run 下会指向不存在的文件,流水线若配置"失败也归档产物"会扑空。建议参考 sift 脚本的做法先 [ -f coverage/lcov.info ] 再提示;如果希望失败 run 也出报告,则配 coverage.reportOnFailure: true。


四条意见都已修复(cb28ab1),感谢 review:
- cpx provider 自愈 gate 到 ut 层:检查条件加上
[ "$MODE" = "ut" ],e2e --coverage路径完全不碰 npm install,离线环境跑 e2e 不再先挂在装依赖上。
2/3. 明细提示改为落盘才打:insight / cpx 均改为[ -f coverage/lcov.info ]后才输出明细位置行(与 sift 对 coverage.xml 的处理一致)。未开启reportOnFailure: true——保持"失败 run 不产报告"的默认语义,若后续流水线需要失败归档再单独开。 - sift -c 撞车:保留
-c简写(与另两包入口一致),头注释已注明 pytest 配置文件请走PYTEST_ADDOPTS="-c <file>"。
本地验证:bash scripts/run-tests.sh cpx --coverage 全绿,明细行正常输出。


compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


背景
流水线门禁要求提供 UT 执行成功记录(执行逻辑 + 覆盖率收集策略)。本 PR 把覆盖率收集接进现有唯一测试入口 scripts/run-tests.sh,门禁默认路径零变化。
改动
--coverage/-c(与 scope 顺序不限;环境变量COVERAGE=1等价,供流水线注入)test:cov(pretest + vitest --coverage);cpx:追加 --coverage,provider 转为本包 devDependency 且缺失自愈补装;sift:pytest --cov(pytest-cov 入 dev extra,随 .[dev] 自愈)验证(分支 ut-coverage,基线 d18ef07)
bash scripts/run-tests.sh all:ALL PASSED,退出码 0 —— insight 1535 / cpx 225 / sift 1805 通过,0 失败bash scripts/run-tests.sh all --coverage:ALL PASSED —— 行覆盖 insight 58.00% / cpx 61.88% / sift 89.46%🤖 Generated with Claude Code