From 70b4abaa757d2211873c866a0f1f386a5b99e297 Mon Sep 17 00:00:00 2001 From: argszero Date: Mon, 10 Aug 2026 19:02:11 +0800 Subject: [PATCH] =?UTF-8?q?emrg:=20evolution=5Fprompt=20=E2=80=94=20CI-che?= =?UTF-8?q?ck=20pre-LGTM=20gate=20(gh=20pr=20checks=20before=20any=20LGTM,?= =?UTF-8?q?=20re-trigger=20dropped-push=20CI)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emrg/server/evolution_prompt.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emrg/server/evolution_prompt.md b/emrg/server/evolution_prompt.md index 1e4d81a..3a4091f 100644 --- a/emrg/server/evolution_prompt.md +++ b/emrg/server/evolution_prompt.md @@ -139,6 +139,10 @@ cd {{ source_dir }} && gh pr list -R {{ owner }}/{{ repo }} --limit 20 - **Match-type logic must also verify synonymous forms (singular/plural)** (#461 lesson: `security import` prints plural `3 identities imported` for multiple identities, but the check only matched singular `identity imported` → p12 files with private keys were falsely blocked. Fix: `identit(y|ies)\ imported` matches both). When reviewing checks that match `*"substring"*`, **enumerate every possible output form and verify each**. - **Verification-type logic should test output emptiness, not exit codes** (#464 lesson: `security find-certificate -c X -a` returns exit 0 even with no matching certificate — with `-a` the exit code is always 0, unreliable; correct form is `[ -z "$(find-certificate ...)" ]` testing empty output). When reviewing shell checks, **first test whether the exit code is reliable in the target scenario**; if unreliable, switch to output-emptiness checks. - **A command's default arguments/evaluation type must match the target object** (#477 lesson: `spctl -a -vv ` defaults to type=execute for executables, reporting "no usable signature" rejected on pkg installers — even when the pkg is Developer ID signed + notarization Accepted + staple succeeded; correct form is `spctl -a -vv --type install `). When reviewing calls to system evaluation/validation commands (spctl/notarytool/stapler/security), **first confirm whether the command's default argument semantics cover the target object type** (pkg vs app vs binary); if unsure, check usage (`spctl --assess [--type type]`). +- **⚡ Before posting any LGTM, confirm the PR has CI checks; if none reported, re-trigger** (#644 lesson: the PR's push event can be dropped — branch had zero checks while both local runs were green and a parallel cycle had already LGTM'd; CI re-validation was only caught by checking `gh pr checks `): + - `gh pr checks -R {{ owner }}/{{ repo }}` → "no checks reported" means the push event was lost, NOT that CI passed + - Re-trigger: `gh workflow run test.yml --ref ` (workflow_dispatch, #527) or `scripts/re-trigger-ci.sh ` (#529), then wait for the run to complete before LGTMing + - Local verification (pytest + npm test) is necessary but NOT sufficient — CI is the only place the actionlint gate (#444) and the full doc-count guard (#511) run - Check merge conditions: does the PR's comment history already have 3 consecutive ✅ from different cycles with no ❌ in between? - ⚠️ Query comments with the REST API (GraphQL needs `read:org` scope, often missing from the token): `gh api repos/{{ owner }}/{{ repo }}/issues//comments --jq '.[] | "\(.user.login): \(.body)"'` @@ -332,6 +336,7 @@ When reading rants, follow these rules: > - evolution cycle truncation flag (#525 scheduler EvolutionHandler done 帧检测 exceeded → truncated 标记,不误计空周期/不推进 idle-halt backoff;impact tag -truncated + truncated=max-tool-rounds;正反两态测试) ✅ > - Test workflow manual dispatch (#527 test.yml 加 workflow_dispatch 触发:push 事件被丢/CI 队列故障时 `gh workflow run test.yml --ref ` 手动重触发,替代空 commit 重触发(空 commit 污染 git 历史且 push 管线若坏同样无效);actionlint gate 已验) ✅ > - CI re-trigger one-click script (#529 scripts/re-trigger-ci.sh [branch]:宿主侧一键 dispatch 重触发(默认当前分支,set -euo pipefail),替代手记 gh workflow run 命令/空 commit;Agent.md CI 段已文档化) ✅ +> - CI-check pre-LGTM gate (#645 #644 教训:PR push 事件可被丢弃——branch 零 checks 而本地双跑绿 + 并行周期已 LGTM,`gh pr checks ` 才暴露;LGTM 前必须确认 CI checks 存在,无则 workflow_dispatch 重触发(#527/#529)等成功后再说;本地验证必要但不充分——actionlint gate #444 + doc-count guard #511 只在 CI 跑) ✅ > - saturation halt auto-resume (#531 scheduler _saturation_halt_active:停机(≥30 空循环)后 scheduled run 全 skip → handler 无法自检 HEAD 变化,只有手动 /trigger 能恢复;_remote_advanced 用 git ls-remote 对比 origin/master,上游推进即自动恢复+计数清零;+4 测试正反两态/边界/无 git 仓库不崩) ✅ > - README MANIFESTO intro anglicized (#533 README.md 行 25 MANIFESTO 中文引言→英文;MANIFESTO.md 零改动(宿主方案 C);行 16 语言切换器 + 行 71 `卸载 EMRG.app` 专有名词保留) ✅ > - README core-differentiator front (#534 特性表第 1 行=自进化、同质化(TUI/daemon/并行/vim)合并 ≤2 行、GUI 描述去版本史 ≤3 行、演化章节前置 Quick Start 前 + Real example 保留;README.md/README.cn.md 同步) ✅