Merged
fix: 完善 DSL 测试生成的检查与纠错闭环 #191
anakinSkywalkerAdd on 16 days ago
fix: 完善 DSL 测试生成的检查与纠错闭环 #191
Merged
anakinSkywalkerAdd on 16 days ago
anakinSkywalker
anakinSkywalker
16 days ago

描述

【算子直调 ops-direct-invoke】完善 CANNBotDSL 测试生成节点:Golden 与白盒并行准备,独立 case 静态审查与全集 CPU 检查并行;失败后依据业务需求修 case 或 Golden,在节点内闭环。最终检查结果符合预期、验收通过后才冻结测试资产并交接实现子图。

合并重复提示词并增加条目标题,明确执行者负责检查纠错,验收者核对审查闭环、全集结果及版本一致性。改动仅涉及 测试生成.yaml。

关联的Issue

关联 Issue #94:https://gitcode.com/cann/cannbot/issues/94

测试

  • 工作流生成测试:12 项通过。
  • YAML 字段、执行/验收提示词生成及可见性检查通过。
  • pre-commit 检查(含 OAT)及 git diff --check 通过;实时预览已核对。
  • 本次为提示词调整,未执行实际算子开发及 NPU 验证。

文档更新

更新测试生成节点的执行、验收和禁止边界说明。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for anakinSkywalker's contribution.)
anakinSkywalkeranakinSkywalker
16 days ago Created pull request, commit 25f1fd8d
anakinSkywalkeranakinSkywalker
16 days ago Associated issue: [Requirement|需求建议]: 完善 DSL 测试生成的全集检查与纠错闭环
CANN-robotCANN-robotCollaborators
16 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

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 ✅ 金炯, xutianze (2/2) ✅ 金炯, xutianze (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

Junren6415, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
anakinSkywalker
anakinSkywalker
16 days ago Comments:

compile

likedislike
anakinSkywalkeranakinSkywalker
16 days ago Pre merge succeeded (commit_id: 03f5a03ae98b63cca746d8636c78184db16c15bc)
CANN-robot
CANN-robotCollaborators
16 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-failed
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

流水线分析报告 — cannbot run#495

流水线: https://gitcode.com/CANN/cannbot/actions/runs/c949e62577b7481ba8123a66164a1ecc | PR#191 | 2026-10-22 19:42:44 ~ 2026-10-22 19:49:24 | 失败 Job 1 个

定界结论: 代码问题 / 代码检查错误 — CodeCheck 检查未通过
  • 失败类型: 代码问题
  • 根因: CodeCheck 代码检查服务对本次 PR 变更扫描, 最终结果 no pass (其余检查 Job: CodeCheck_style / CodeCheck_precommit / CodeCheck_check-pr / Antipoison / SCA 均已通过, 非服务故障)
  • 处置建议: 通知 PR 提交者按检查详情页的违规项修复代码, 重新推送后触发流水线验证

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — CodeCheck 检查未通过
  • 判据: codecheck 检查不通过
  • 定位步骤: 3_codecheck.log
  • 影响 Job: CodeCheck
  • 根因证据(日志原文):
[2026-10-22 19:49:01.026+08:00] 2026-10-22 19:49:01,002 - INFO 响应: {"code":"200","msg":"success","data":"https://www.openlibing.com/apps/entryCheckDashCode/MR_8ca31519c94b4414955f743e86c3e0c6/b936dc28878fe1bcf5dc89b6ebffec1b?projectId=300033&codeHostingPlatformFlag=gitcode","uuid":null,"state":"no pass","failData":null,...}
[2026-10-22 19:49:01.026+08:00] 2026-10-22 19:49:01,005 - INFO [codecheck 2026-10-22 19:49:01] codecheck result: no pass.
[2026-10-22 19:49:01.026+08:00] ::error::Process exited with code 255
  • 说明: 任务创建与轮询均正常 (Create task success → 多次 Task still running → 最终 state: no pass), 属于检查服务对代码的真实判定不通过, 非服务端故障。具体违规项请查看检查详情页: CodeCheck 结果详情
  • 处置: PR 提交者按上述详情页列出的违规项修复代码, 推送新提交后重新触发流水线
结构化定界摘要
[{"repo": "cannbot", "run_number": 495, "Failed_Type": "代码问题",
  "Failed_Sub_Type": "代码检查错误", "Failed_Reason": "CodeCheck 代码检查服务对 PR 变更扫描返回 no pass, 任务创建与轮询正常, 属检查真实不通过, 具体违规项见详情页 URL",
  "evidence": "2026-10-22 19:49:01,005 - INFO [codecheck 2026-10-22 19:49:01] codecheck result: no pass.",
  "suggestion": "提交者按 CodeCheck 详情页违规项修复代码后重新推送触发",
  "jobs": "CodeCheck"}]

由门禁失败定界分析自动生成 | repo: cannbot | run: c949e62577b7481ba8123a66164a1ecc | PR#191

likedislike
anakinSkywalker
anakinSkywalker
16 days ago Comments:

compile

likedislike
CANN-robot
CANN-robotCollaborators
16 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
16 days ago Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-failed
CANN-robot
CANN-robotCollaborators
16 days ago Comments:

流水线分析报告 — cannbot run#496

流水线: https://gitcode.com/CANN/cannbot/actions/runs/26921e84c9884beeb682cd9d2012903d | PR#191 | 2026-10-22 20:08:48 ~ 2026-10-22 20:11:26 | 失败 Job 1 个

定界结论: 代码问题 / 代码检查错误
  • 失败类型: 代码问题
  • 根因: CodeCheck 任务调用外部代码检查服务, 检查结果为 no pass, 进程以退出码 255 失败
  • 处置建议: 通知 PR 提交者打开检查报告链接查看具体违规项, 修复后重新触发流水线
  • 排除项: 任务创建与轮询均正常(状态码 200), 非服务/网络故障; 日志无 Runner 或平台内部错误

失败根因分析

根因 #1: 代码问题 / 代码检查错误 — codecheck 检查结果 no pass
  • 判据: codecheck 检查不通过
  • 定位步骤: 3_codecheck.log
  • 影响 Job: CodeCheck
  • 根因证据(日志原文):
[2026-10-22 20:11:04.708+08:00] 2026-10-22 20:11:04,688 - INFO 响应: {"code":"200","msg":"success","data":"https://www.openlibing.com/apps/entryCheckDashCode/MR_a97cf685202948a59522e5128828b1ff/bbeabc32d9df2c8207e91cf38f87c5a3?projectId=300033&codeHostingPlatformFlag=gitcode","uuid":null,"state":"no pass","failData":null,"taskCount":0,"task_id":null}
[2026-10-22 20:11:04.708+08:00] 2026-10-22 20:11:04,688 - INFO [codecheck 2026-10-22 20:11:04] Task failed
[2026-10-22 20:11:04.709+08:00] 2026-10-22 20:11:04,690 - INFO [codecheck 2026-10-22 20:11:04] codecheck result: no pass.
[2026-10-22 20:11:04.709+08:00] ::error::Process exited with code 255
结构化定界摘要
[{"repo": "cannbot", "run_number": 496, "Failed_Type": "代码问题",
  "Failed_Sub_Type": "代码检查错误", "Failed_Reason": "CodeCheck 任务调用外部代码检查服务, 检查结果为 no pass, 进程以退出码 255 失败, 具体违规项见检查报告链接",
  "evidence": "2026-10-22 20:11:04,690 - INFO [codecheck 2026-10-22 20:11:04] codecheck result: no pass.",
  "suggestion": "提交者打开检查报告链接查看具体违规项, 修复后重新触发流水线",
  "jobs": "CodeCheck"}]

由门禁失败定界分析自动生成 | repo: cannbot | run: 26921e84c9884beeb682cd9d2012903d | PR#191

likedislike
anakinSkywalker
anakinSkywalker
16 days ago Comments:

compile

likedislike
CANN-robot
CANN-robotCollaborators
16 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
16 days ago Removed label: ci-pipeline-failed
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
16 days ago Added label: ci-pipeline-passed
anakinSkywalker
anakinSkywalker
16 days ago Comments:
likedislike
jon_jinCollaborators
16 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: approved
anakinSkywalker
anakinSkywalker
16 days ago Comments:
likedislike
xutianze
xutianzeCollaborators
16 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
16 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
16 days ago Merged pull request