From 0475e40529a5202d19ad7f2e49933530e7b0821b Mon Sep 17 00:00:00 2001 From: cfdaily Date: Fri, 19 Jun 2026 09:35:10 +0800 Subject: [PATCH] =?UTF-8?q?[moz]=20docs(=C2=A717):=20fix=20M1=20=E7=AB=A0?= =?UTF-8?q?=E8=8A=82=E5=BC=95=E7=94=A8=20=C2=A76.3=E2=86=92=C2=A76.4=20+?= =?UTF-8?q?=20S1=20label=E5=88=86=E6=B5=81=E5=BE=85=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E6=A0=87=E6=B3=A8=20+=20S2=20label=E9=A2=84=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=20+=20G1=20=E9=94=99=E5=88=AB=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/design/17-toolchain-handler-enforcement.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/design/17-toolchain-handler-enforcement.md b/docs/design/17-toolchain-handler-enforcement.md index 2cb45eb..ed6b1ed 100644 --- a/docs/design/17-toolchain-handler-enforcement.md +++ b/docs/design/17-toolchain-handler-enforcement.md @@ -391,11 +391,11 @@ def verify_completion(self, task_id: str, db_path: Path) -> VerifyResult: #### 完整设计 -三分路的详细设计见 §6.3(基础设施 Issue 转交流程)和 toolchain_handler.py 实现(`_handle_infrastructure_failure` / `_classify_failure`)。 +三分路的详细设计见 §6.4(基础设施 Issue 转交流程)和 toolchain_handler.py 实现(`_handle_infrastructure_failure` / `_classify_failure`)。 #### 首次 steps 分支指引 -三分路是 verify 失败后的兑底机制。此外,ci_failure 和 deploy_failure 的首次 toolchain task steps 中**已包含分支指引**——agent 在执行过程中自行判断失败原因,如果是基础设施问题则直接创建 Issue 指派 jiangwei-infra(见 §6.3)。三分路作为第二道防线,覆盖 agent 未正确判断或未执行分支的情况。 +三分路是 verify 失败后的兜底机制。此外,ci_failure 和 deploy_failure 的首次 toolchain task steps 中**已包含分支指引**——agent 在执行过程中自行判断失败原因,如果是基础设施问题则直接创建 Issue 指派 jiangwei-infra(见 §6.4)。三分路作为第二道防线,覆盖 agent 未正确判断或未执行分支的情况。 ### 5.3 action_report comment 格式 @@ -508,7 +508,7 @@ steps: 1. 查看完整 CI 日志(PR 页面或 Gitea Actions 页面) 2. 根据 CI 日志判断失败原因类型: a. 代码问题(lint/test 失败)→ 修复失败的测试 → push 到原分支 → CI 自动重跑 - b. 基础设施问题(runner 环境/Python/venv/Gitea/网络故障)→ 在该仓库创建 Issue 指派 jiangwei-infra(见 §6.3),label 必须包含 type/infrastructure + b. 基础设施问题(runner 环境/Python/venv/Gitea/网络故障)→ 在该仓库创建 Issue 指派 jiangwei-infra(见 §6.4),label 必须包含 type/infrastructure 3. 提交 action report — 报告中说明判断的原因类型和执行的操作 context: pr_number, repo, branch, error_summary @@ -551,7 +551,7 @@ steps: 1. 检查 deploy 日志 2. 根据 deploy 日志判断失败原因类型: a. 代码/配置问题(rsync 路径错、依赖缺失、启动失败)→ 修复 → 重新部署 - b. 基础设施问题(Gitea 不可用、网络不通、磁盘满、SSH 故障)→ 在该仓库创建 Issue 指派 jiangwei-infra(见 §6.3),label 必须包含 type/infrastructure + b. 基础设施问题(Gitea 不可用、网络不通、磁盘满、SSH 故障)→ 在该仓库创建 Issue 指派 jiangwei-infra(见 §6.4),label 必须包含 type/infrastructure 3. 提交 action report — 报告中说明判断的原因类型和执行的操作 context: repo, commit_sha, reason @@ -642,6 +642,10 @@ context: 基础设施路径的 verify 始终 auto-pass(防递归,已有逻辑覆盖)。 +⚠️ **label 分流当前为设计目标**,toolchain_handler.py 尚未实现 issue_assigned 的 label 检查。当前只有 `_handle_infrastructure_failure`(verify 失败时)创建 infrastructure_failure task。issue_assigned handler 的 label 分流在后续代码 PR 中实现。 + +⚠️ **label 预创建**:使用前需确认仓库中已创建名为 `type/infrastructure` 的 label。sanguo_moziplus_v2 仓库已创建(ID=98)。其他仓库使用前需先创建。 + #### API 指令位置 Issue 创建的 API 调用方式(curl 示例)统一在 ToolchainApiSection 中,与 action_report / comment 指引并列。steps 指令中不重复 API 调用方式,只描述"做什么"。