From 778c3306fcc40d35b5031b9e45669ac8ca4d22cd Mon Sep 17 00:00:00 2001 From: argszero Date: Thu, 6 Aug 2026 12:03:11 +0800 Subject: [PATCH] =?UTF-8?q?emrg:=20evolution=5Fprompt=20review=20=E6=8C=87?= =?UTF-8?q?=E5=8D=97=E8=A1=A5=E5=85=85=20=E2=80=94=20=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=B1=BB=E9=80=BB=E8=BE=91=E9=9C=80=E6=AD=A3=E5=8F=8D=E4=B8=A4?= =?UTF-8?q?=E6=80=81=E9=AA=8C=E8=AF=81=EF=BC=88#455=20=E6=95=99=E8=AE=AD?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #455(p12 私钥存在性检查)从'失败数据'推断检查逻辑:grep -c 'class: 0x0000000F' 数私钥——实测 0x0000000F 是私钥项内部属性 ID 而非 class 行,含私钥 keychain 上返回 0 → 宿主修复 secret 后 CI 误报。 #456 修正为解析 security import 输出的 'identity imported' 判别信号 (含私钥 → identity imported;仅证书 → certificates imported)。 将经验固化到演化 prompt 的 review 指南:审查验证类逻辑(检查/检测/ grep 条件)时,必须在成功场景与失败场景各验证判别信号可靠,不能只 在失败案例上推断。 --- emrg/server/evolution_prompt.md | 1 + 1 file changed, 1 insertion(+) diff --git a/emrg/server/evolution_prompt.md b/emrg/server/evolution_prompt.md index 899bb102..ccfddd1b 100644 --- a/emrg/server/evolution_prompt.md +++ b/emrg/server/evolution_prompt.md @@ -100,6 +100,7 @@ cd {{ source_dir }} && gh pr list -R {{ owner }}/{{ repo }} --limit 20 - **⚡ workflow/CI 改动必须跑 actionlint 校验**(#441 教训:build-release.yml 的 `if:` 中直接引用 `secrets` 上下文导致 workflow 解析失败,人工审查漏检、push 后才在 CI 暴露): - 本地校验:`actionlint .github/workflows/*.yml`(macOS 版无 shellcheck 集成,CI Docker 版才完整——本地通过 ≠ CI 一定过,shellcheck 警告在 CI 会失败) - 仓库 test.yml 已有 `rhysd/actionlint@v1.7.12` 门禁步骤(#444 固化,全量校验所有 workflow),但 review CI 改动时仍应主动本地跑一遍确认 +- **⚡ 验证类逻辑(检查/检测/grep 条件)必须在正反两态都验证**(#455 教训:review 时从"失败数据"推断检查逻辑,`grep -c 'class: 0x0000000F'` 数私钥——实测 0x0000000F 是属性 ID 非 class 行,含私钥时返回 0 → 宿主修复后误报失败;正确方法解析 `security import` 输出的 `identity imported` 判别信号,#456 修正)。审查此类改动时:**在成功场景与失败场景各跑一遍确认判别信号可靠**,不能只在失败案例上推断。 - 检查合并条件:PR 的 comment 历史中是否已有连续 3 个不同 cycle 的 ✅ 且中间无 ❌? - ⚠️ 查询评论用 REST API(GraphQL 需 `read:org` scope,token 常缺): `gh api repos/{{ owner }}/{{ repo }}/issues//comments --jq '.[] | "\(.user.login): \(.body)"'`