修复(CI追绿·run26): 三残余根因——①probe_gate verdict加macOS退出段挂死受控例外(PASS签名+错误扫描双证齐全按完成判定,headless探针同样挂死run26实证) ②render_gate三探针if-124首分支拆除改工件锚(上轮半补丁只删了elif漏了if首分支,board PASS后仍被拦红) ③裸python×5→python3(scan_log/shot_checker/crop/compare,runner无python别名——与run16/23同族末例)

This commit is contained in:
DKChan committed 2026-11-03 17:03:27 +08:00
1 parent 2bf23d0e05
commit c9b16b7f34
2 files changed
+13 -14

No files matched your search

+6
View File
@@ -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
+7 -14
View File
@@ -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