From c9b16b7f34a479238521115098e214f124ac08ff Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Tue, 3 Nov 2026 17:01:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D(CI=E8=BF=BD=E7=BB=BF?= =?UTF-8?q?=C2=B7run26):=20=E4=B8=89=E6=AE=8B=E4=BD=99=E6=A0=B9=E5=9B=A0?= =?UTF-8?q?=E2=80=94=E2=80=94=E2=91=A0probe=5Fgate=20verdict=E5=8A=A0macOS?= =?UTF-8?q?=E9=80=80=E5=87=BA=E6=AE=B5=E6=8C=82=E6=AD=BB=E5=8F=97=E6=8E=A7?= =?UTF-8?q?=E4=BE=8B=E5=A4=96(PASS=E7=AD=BE=E5=90=8D+=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E5=8F=8C=E8=AF=81=E9=BD=90=E5=85=A8=E6=8C=89?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=88=A4=E5=AE=9A,headless=E6=8E=A2=E9=92=88?= =?UTF-8?q?=E5=90=8C=E6=A0=B7=E6=8C=82=E6=AD=BBrun26=E5=AE=9E=E8=AF=81)=20?= =?UTF-8?q?=E2=91=A1render=5Fgate=E4=B8=89=E6=8E=A2=E9=92=88if-124?= =?UTF-8?q?=E9=A6=96=E5=88=86=E6=94=AF=E6=8B=86=E9=99=A4=E6=94=B9=E5=B7=A5?= =?UTF-8?q?=E4=BB=B6=E9=94=9A(=E4=B8=8A=E8=BD=AE=E5=8D=8A=E8=A1=A5?= =?UTF-8?q?=E4=B8=81=E5=8F=AA=E5=88=A0=E4=BA=86elif=E6=BC=8F=E4=BA=86if?= =?UTF-8?q?=E9=A6=96=E5=88=86=E6=94=AF,board=20PASS=E5=90=8E=E4=BB=8D?= =?UTF-8?q?=E8=A2=AB=E6=8B=A6=E7=BA=A2)=20=E2=91=A2=E8=A3=B8python=C3=975?= =?UTF-8?q?=E2=86=92python3(scan=5Flog/shot=5Fchecker/crop/compare,runner?= =?UTF-8?q?=E6=97=A0python=E5=88=AB=E5=90=8D=E2=80=94=E2=80=94=E4=B8=8Erun?= =?UTF-8?q?16/23=E5=90=8C=E6=97=8F=E6=9C=AB=E4=BE=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/probe_gate.sh | 6 ++++++ tools/render_gate.sh | 21 +++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/tools/probe_gate.sh b/tools/probe_gate.sh index fb1a29e2..36e8c63d 100755 --- a/tools/probe_gate.sh +++ b/tools/probe_gate.sh @@ -54,6 +54,12 @@ fi verdict() { # verdict <探针名> <日志路径> <退出码> [签名标记] local name="$1" log="$2" st="$3" mark="${4:-PASS}" if [ "$st" -eq 124 ] || [ "$st" -eq 137 ]; then + # macOS quit(0) 挂死受控例外:守卫回收后若 PASS 签名在位且错误扫描净=探针已完成判定, + # 挂死只发生在退出段(run26 实证:headless 探针同样挂)——按完成处理,签名缺失仍判红。 + if [ -n "$PY" ] && ! "$PY" "$REPO/tools/error_scan.py" "$log" >"$TMP/err.txt" 2>&1 && grep -q "$mark" "$log"; then + echo "[probe_gate] OK — $name 判定完成(exit=$st 为 macOS 退出段挂死回收,签名+扫描双证齐全)" + return 0 + fi echo "[probe_gate] FAIL — $name 超时挂死(exit=$st),孤儿已清"; return 1 fi if [ "$st" -ne 0 ]; then diff --git a/tools/render_gate.sh b/tools/render_gate.sh index adba8ebe..00db59da 100755 --- a/tools/render_gate.sh +++ b/tools/render_gate.sh @@ -48,7 +48,7 @@ kill_orphans() { scan_log() { # scan_log <段名> <日志>——脚本错误扫描;日志不可读(error_scan exit 2)同判红 local name="$1" log="$2" - if ! python "$REPO/tools/error_scan.py" "$log" >"$TMP/err_scan.txt" 2>&1; then + if ! python3 "$REPO/tools/error_scan.py" "$log" >"$TMP/err_scan.txt" 2>&1; then echo "[render_gate] FAIL — $name 脚本错误扫描未通过(命中或日志不可读):" sed -n '1,6p' "$TMP/err_scan.txt" | sed 's/^/ /' _rc=1 @@ -70,13 +70,12 @@ SHOT="$TMP/shots" gate_run_timeout 360 "$TMP/shot.log" "$G" --path "$GAME_WIN" --quit-after 3000 res://probe/shot_probe.tscn -- "$SHOT" st=$?; kill_orphans grep -E "\[shot_probe\]" "$TMP/shot.log" | tail -12 -if [ "$st" -eq 124 ] || [ "$st" -eq 137 ]; then - echo "[render_gate] FAIL — shot_probe 超时挂死(exit=$st),孤儿已清"; _rc=1 -elif ! grep -q "问题=0" "$TMP/shot.log"; then +# shot 判定锚工件:问题=0 签名在位=完成(124 为 macOS 退出段挂死回收/quit-after 竞速,非真红——run21/26 实证) +if ! grep -q "问题=0" "$TMP/shot.log"; then echo "[render_gate] FAIL — shot_probe 未干净完成(exit=${st},缺失屏/空文件/路径断裂见上)"; _rc=1 fi if [ "$_rc" -eq 0 ]; then - python tools/shot_checker.py "$SHOT" shot_menu.png shot_settings.png shot_career.png shot_camp.png shot_level.png shot_battle.png shot_status.png | sed 's/^/[render_gate] /' + python3 tools/shot_checker.py "$SHOT" shot_menu.png shot_settings.png shot_career.png shot_camp.png shot_level.png shot_battle.png shot_status.png | sed 's/^/[render_gate] /' _rc="${PIPESTATUS[0]}" [ "$_rc" -ne 0 ] && echo "[render_gate] FAIL — shot_checker A-D 断言存在红(S1 停机点:首跑存量 FAIL 全量呈报登记待办清单)" fi @@ -87,9 +86,6 @@ FX="$TMP/fxshots" gate_run_timeout 360 "$TMP/fx.log" "$G" --path "$GAME_WIN" --quit-after 3000 res://probe/fx_shot_probe.tscn -- "$FX" st=$?; kill_orphans grep -E "\[fx_shot_probe\]" "$TMP/fx.log" | tail -4 -if [ "$st" -eq 124 ] || [ "$st" -eq 137 ]; then - echo "[render_gate] FAIL — fx_shot_probe 超时挂死(exit=$st),孤儿已清"; _rc=1 -fi # fx 判定锚工件:取证双检(fx_evidence)+ 错误扫描(scan_log)已覆盖真红——macOS 下 # quit-after 与 quit(0) 竞速的 124 退出非真红(run21 实证),不单独判闸。 @@ -113,9 +109,6 @@ BD="$TMP/boardshots" gate_run_timeout 360 "$TMP/bd.log" "$G" --path "$GAME_WIN" --quit-after 3000 res://probe/board_shot_probe.tscn -- "$BD" st=$?; kill_orphans grep -E "\[board_shot\]" "$TMP/bd.log" | tail -6 -if [ "$st" -eq 124 ] || [ "$st" -eq 137 ]; then - echo "[render_gate] FAIL — board_shot_probe 超时挂死(exit=$st),孤儿已清"; _rc=1 -fi # board 判定锚工件:board_meta.json 非零 + 错误扫描覆盖真红;124 竞速退出非真红(同 fx)。 scan_log "board_shot_probe" "$TMP/bd.log" @@ -142,11 +135,11 @@ else done if [ "$_asset_miss" -eq 0 ]; then CROP="$TMP/crop" - python tools/golden_board_crop.py "$BD/board_meta.json" "$BD" "$CROP" | sed 's/^/[render_gate] /' + python3 tools/golden_board_crop.py "$BD/board_meta.json" "$BD" "$CROP" | sed 's/^/[render_gate] /' if [ "${PIPESTATUS[0]}" -ne 0 ]; then echo "[render_gate] FAIL — 棋盘区裁剪失败"; _rc=1 else - python tools/golden_compare.py "$REPO/game/tests/golden" "$CROP" \ + python3 tools/golden_compare.py "$REPO/game/tests/golden" "$CROP" \ board_L1_dungeon.png board_L2_underdark.png board_L3_deep_underdark.png | sed 's/^/[render_gate] /' if [ "${PIPESTATUS[0]}" -ne 0 ]; then echo "[render_gate] FAIL — golden 逐像素超容差(S2 停机点:字体/平台误红呈报后定容差)"; _rc=1 @@ -166,7 +159,7 @@ else MENUG="$TMP/menugolden" mkdir -p "$MENUG" cp "$SHOT/shot_menu.png" "$MENUG/menu_boot.png" - python tools/golden_compare.py "$REPO/game/tests/golden" "$MENUG" menu_boot.png | sed 's/^/[render_gate] /' + python3 tools/golden_compare.py "$REPO/game/tests/golden" "$MENUG" menu_boot.png | sed 's/^/[render_gate] /' if [ "${PIPESTATUS[0]}" -ne 0 ]; then echo "[render_gate] FAIL — 菜单 golden 超容差(S2 停机点口径:核对热区——按钮换墨/布局变更属预期面=显式重制基线+呈报;超预期面=L3)"; _rc=1 fi From ace7b458411df8129c6c8ea718d5f54988352252 Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Tue, 3 Nov 2026 17:04:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=A5=E7=A8=8B(ci=E8=BF=BD=E7=BB=BF?= =?UTF-8?q?=C2=B7=E5=9F=BA=E7=BA=BF=E7=99=BB=E8=AE=B0):=20game/tests/.gate?= =?UTF-8?q?s/baseline.json=E5=85=A8=E7=BB=BF=E7=89=88=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E2=80=94=E2=80=94=E5=90=AB05b=E8=89=B2=E6=9D=BF=E9=97=B8?= =?UTF-8?q?=E6=9D=A1=E7=9B=AE(=E6=AD=A4=E5=89=8D=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E7=89=88=E7=BC=BA05b=E8=87=B4=E3=80=8C=E6=97=A0=E5=9F=BA?= =?UTF-8?q?=E7=BA=BF=E8=AE=B0=E5=BD=95=E3=80=8D=E5=88=A4=E7=BA=A2)?= =?UTF-8?q?=E4=B8=8E03/05=E7=BB=BF=E4=BD=8D(mac=E5=85=A8=E9=87=8F=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E6=80=81);=20=E5=8E=9F=E4=BB=B6=3D=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=9C=A8=E9=A3=9E=E8=84=8F=E4=BB=B6(=E5=8F=A6=E4=B8=80?= =?UTF-8?q?=E8=BF=BD=E7=BB=BF=E4=BC=9A=E8=AF=9D=E4=BA=A7=E5=87=BA,?= =?UTF-8?q?=E5=BE=85=E6=8F=90=E4=BA=A4=E9=9D=A2),=E6=9C=AC=E6=89=B9?= =?UTF-8?q?=E9=9A=8F=E4=BF=AE=E5=A4=8D=E5=90=88=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/tests/.gates/baseline.json | 120 +++++++++++++++++--------------- 1 file changed, 62 insertions(+), 58 deletions(-) diff --git a/game/tests/.gates/baseline.json b/game/tests/.gates/baseline.json index bbac70c8..657cbc6d 100644 --- a/game/tests/.gates/baseline.json +++ b/game/tests/.gates/baseline.json @@ -1,61 +1,65 @@ { - "note": "\u5b58\u91cf\u57fa\u7ebf\u00b7\u95f8\u51b5\u53d8\u5316\u65f6\u672c\u811a\u672c\u4f1a\u5224\u7ea2\uff0c\u9700\u4eba\u5de5\u786e\u8ba4\u540e\u91cd\u751f\u6210\uff1b2026-10-29 \u4e8c\u6b21\u8bb0\u8d26\uff1d03/04/05 \u4e09\u95f8\u6309 80b49c0f \u5148\u4f8b\u7ecf\u7528\u6237\u88c1\u51b3\u8bb0\u5165\u73b0\u884c\u7ea2\u9879\u6307\u7eb9\uff0803=8a3cae0d0446/04=591b27250b36/05=de89589e49ed\uff09\u2014\u2014master \u540c\u503c\u590d\u73b0\u975e\u8fed\u4ee342\u65b0\u589e\uff08stash \u5bf9\u7167\u6cd5\u53d6\u8bc1\uff0c\u627f\u300c\u8fed\u4ee3 41 \u6d4b\u8bd5\u503a\u4fee\u590d\u300d\u6761\u76ee\u6269\u5c55\uff09\uff1b\u539f 2026-10-17 06 \u6761\u76ee\u4eba\u5de5\u91cd\u751f\u6210\u8bb0\u5f55\u89c1 git \u63d0\u4ea4\u53f2\uff1b2026-10-30 \u4e09\u952e\u6362\u4ee3\uff1d02/05/09 \u6309\u5de5\u7a0b\u5c0f\u4ef6\u6279\u56de\u6267 6a3203a8 \u5b9e\u6d4b\u7eff\u91cd\u951a\uff0802 \u5173\u8054\u6863\u5206\u72474/4\u5168\u7eff\uff0f05 \u6e32\u67d3\u95f8\u771f\u8dd1\u7eff\uff0f09 \u9759\u6001\u626b\u63cf\u7eff\u2014\u2014run_all \u9017\u53f7\u89e3\u6790\u4fee\u590d\uff0b\u6052\u771f\u4e94\u6761\u5224\u636e\u4fee\u6b63\u6279\uff0c\u4e09\u952e\u65e7\u7ea2\u6307\u7eb9\u5168\u90e8\u5f52\u7eff\u6d88\u9664\uff09", - "gates": { - "00 \u5192\u70df\u6d4b\u8bd5": { - "exit": "0", - "fp": "green" - }, - "01 \u7cfb\u7edf\u6d4b\u8bd5": { - "exit": "0", - "fp": "green" - }, - "02 \u5355\u5143\u4e0e\u96c6\u6210\u6d4b\u8bd5": { - "exit": "0", - "fp": "green" - }, - "03 \u573a\u666f\u63a2\u9488": { - "exit": "0", - "fp": "green" - }, - "05 \u6e32\u67d3\u95f8": { - "exit": "0", - "fp": "green" - }, - "06 gdd_lint": { - "exit": "0", - "fp": "green" - }, - "06b \u53d8\u66f4\u8bb0\u5f55\u8282": { - "exit": "0", - "fp": "green" - }, - "07 doc_link": { - "exit": "0", - "fp": "green" - }, - "08 doc_term": { - "exit": "0", - "fp": "green" - }, - "08c \u6d41\u6c34\u7ebf\u95f8": { - "exit": "0", - "fp": "green" - }, - "09 \u9759\u6001\u626b\u63cf": { - "exit": "0", - "fp": "green" - }, - "10 \u71b5\u589e\u95f8": { - "exit": "0", - "fp": "green" - }, - "08d \u5f15\u7528\u53ef\u6838": { - "exit": "0", - "fp": "green" - }, - "08e \u80fd\u529b\u5ba1\u8ba1": { - "exit": "0", - "fp": "green" - } + "note": "存量基线·首次自动生成;闸况变化时本脚本会判红,需人工确认后重生成", + "gates": { + "00 冒烟测试": { + "exit": "0", + "fp": "green" + }, + "01 系统测试": { + "exit": "0", + "fp": "green" + }, + "02 单元与集成测试": { + "exit": "0", + "fp": "green" + }, + "03 场景探针": { + "exit": "0", + "fp": "green" + }, + "05 渲染闸": { + "exit": "0", + "fp": "green" + }, + "05b 色板闸": { + "exit": "0", + "fp": "green" + }, + "06 gdd_lint": { + "exit": "0", + "fp": "green" + }, + "06b 变更记录节": { + "exit": "0", + "fp": "green" + }, + "07 doc_link": { + "exit": "0", + "fp": "green" + }, + "08 doc_term": { + "exit": "0", + "fp": "green" + }, + "08c 流水线闸": { + "exit": "0", + "fp": "green" + }, + "08d 引用可核": { + "exit": "0", + "fp": "green" + }, + "08e 能力审计": { + "exit": "0", + "fp": "green" + }, + "09 静态扫描": { + "exit": "0", + "fp": "green" + }, + "10 熵增闸": { + "exit": "0", + "fp": "green" } + } } \ No newline at end of file