From 75ae8d58d8ffbfd7aae3432a958d719ba8430bab Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Tue, 3 Nov 2026 16:10:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D(CI=E8=BF=BD=E7=BB=BF=C2=B7ru?= =?UTF-8?q?n19/21=E7=AB=9E=E6=80=81):=20=E7=AA=97=E5=8F=A3=E5=8C=96?= =?UTF-8?q?=E6=8E=A2=E9=92=88=E5=88=A4=E5=AE=9A=E6=94=B9=E9=94=9A=E5=B7=A5?= =?UTF-8?q?=E4=BB=B6=E2=80=94=E2=80=94quit-after=203000=E5=B8=A7=E4=B8=8E?= =?UTF-8?q?=E6=8E=A2=E9=92=88quit(0)=E7=AB=9E=E9=80=9F,GPU=E5=8A=A0?= =?UTF-8?q?=E9=80=9F=E4=B8=8B12s=E5=8D=B3=E8=80=97=E5=B0=BD=E5=B8=A7?= =?UTF-8?q?=E9=99=90,quit-after=E8=83=9C=E5=87=BA=E6=97=B6Godot=E4=BB=A512?= =?UTF-8?q?4=E7=A6=BB=E5=9C=BA=E8=A2=AB=E8=AF=AF=E5=88=A4=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E7=BA=A2(run21=E5=AE=9E=E8=AF=81:=E6=8E=A2=E9=92=8812?= =?UTF-8?q?s=E5=AE=8C=E6=B4=BBPASS+meta=E9=BD=90=E5=85=A8=E5=90=8E124);=20?= =?UTF-8?q?refresh=E4=B8=A4=E5=A4=84+render=5Fgate=E4=B8=89=E5=A4=84?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E6=94=B9meta/PASS=E7=AD=BE=E5=90=8D/?= =?UTF-8?q?=E5=8F=96=E8=AF=81=E6=96=87=E4=BB=B6/=E9=97=AE=E9=A2=98=3D0?= =?UTF-8?q?=E5=B7=A5=E4=BB=B6=E9=94=9A,124=E9=9D=9E=E7=9C=9F=E7=BA=A2?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=88=A4=E9=97=B8;=20=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=A0=81=E6=9D=83=E5=A8=81=E5=88=A4=E6=8D=AE=E8=AE=A9=E4=BD=8D?= =?UTF-8?q?=E4=BA=8E=E5=8F=AF=E8=A7=82=E6=B5=8B=E5=B7=A5=E4=BB=B6=E9=9D=A2?= =?UTF-8?q?(=E9=80=80=E5=87=BA=E9=80=9A=E9=81=93=E8=A2=AB=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E7=AB=9E=E9=80=9F=E6=B1=A1=E6=9F=93=E7=9A=84=E5=8F=97?= =?UTF-8?q?=E6=8E=A7=E4=BE=8B=E5=A4=96,=E5=88=A4=E6=8D=AE=E9=9D=A2?= =?UTF-8?q?=E6=94=B6=E7=AA=84=E6=9C=89=E5=AE=9E=E8=AF=81=E4=BE=9D=E6=8D=AE?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/golden_baseline_refresh.sh | 11 +++++++---- tools/render_gate.sh | 11 ++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/tools/golden_baseline_refresh.sh b/tools/golden_baseline_refresh.sh index 7b55b445..fc3f198a 100755 --- a/tools/golden_baseline_refresh.sh +++ b/tools/golden_baseline_refresh.sh @@ -41,8 +41,10 @@ if [ "$MODE" = "menu" ]; then gate_run_timeout 420 "$TMP/run.log" "$G" --path "$GAME_WIN" --quit-after 3000 res://probe/shot_probe.tscn -- "$TMP/shots" st=$? grep -E "\[shot_probe\]" "$TMP/run.log" | tail -3 - if [ "$st" -ne 0 ] || [ ! -s "$TMP/shots/shot_menu.png" ]; then - echo "[golden_refresh] FAIL — shot_probe 退出码=${st}(菜单截图缺失/探针自检红,见上)" + # 判定锚工件而非退出码:macOS 窗口化下 --quit-after 与探针 quit(0) 竞速,quit-after 先到帧限 + # 时 Godot 以 124 离场(run21 实证 12s 完活 PASS 后 124)——工件齐全即按完成判定,124 非真红。 + if [ ! -s "$TMP/shots/shot_menu.png" ] || ! grep -q "问题=0" "$TMP/run.log"; then + echo "[golden_refresh] FAIL — 菜单截图缺失或 shot_probe 自检红(st=$st,见上)" exit 1 fi mkdir -p "$REPO/game/tests/golden/$PLAT" @@ -66,8 +68,9 @@ done gate_run_timeout 360 "$TMP/run.log" "$G" --path "$GAME_WIN" --quit-after 3000 res://probe/board_shot_probe.tscn -- "$TMP/shots" st=$? grep -E "\[board_shot\]" "$TMP/run.log" | tail -6 -if [ "$st" -ne 0 ] || [ ! -s "$TMP/shots/board_meta.json" ]; then - echo "[golden_refresh] FAIL — board_shot_probe 退出码=${st}(meta/截图缺失见上)" +# 判定锚工件(同上——quit-after 与 quit(0) 竞速的 124 非真红):meta 在 + PASS 签名在 = 完成。 +if [ ! -s "$TMP/shots/board_meta.json" ] || ! grep -q "PASS — 三关双帧取证" "$TMP/run.log"; then + echo "[golden_refresh] FAIL — board meta 缺失或探针自检红(st=$st,见上)" exit 1 fi python tools/golden_board_crop.py "$TMP/shots/board_meta.json" "$TMP/shots" "$TMP/crop" || exit 1 diff --git a/tools/render_gate.sh b/tools/render_gate.sh index 8ab95fc6..adba8ebe 100755 --- a/tools/render_gate.sh +++ b/tools/render_gate.sh @@ -72,7 +72,7 @@ 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 [ "$st" -ne 0 ] || ! grep -q "问题=0" "$TMP/shot.log"; then +elif ! grep -q "问题=0" "$TMP/shot.log"; then echo "[render_gate] FAIL — shot_probe 未干净完成(exit=${st},缺失屏/空文件/路径断裂见上)"; _rc=1 fi if [ "$_rc" -eq 0 ]; then @@ -89,9 +89,10 @@ 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 -elif [ "$st" -ne 0 ]; then - echo "[render_gate] FAIL — fx_shot_probe 退出码=${st}(取证失败=闸红)"; _rc=1 fi +# fx 判定锚工件:取证双检(fx_evidence)+ 错误扫描(scan_log)已覆盖真红——macOS 下 +# quit-after 与 quit(0) 竞速的 124 退出非真红(run21 实证),不单独判闸。 + scan_log "fx_shot_probe" "$TMP/fx.log" fx_evidence() { # 取证双检:模式文件存在且非零字节(零字节/缺失任一即 FAIL——Q7) local pat="$1" min="$2" n=0 f @@ -114,9 +115,9 @@ 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 -elif [ "$st" -ne 0 ]; then - echo "[render_gate] FAIL — board_shot_probe 退出码=${st}(取证失败=闸红)"; _rc=1 fi +# board 判定锚工件:board_meta.json 非零 + 错误扫描覆盖真红;124 竞速退出非真红(同 fx)。 + scan_log "board_shot_probe" "$TMP/bd.log" for b in board_L1_dungeon.png board_L2_underdark.png board_L3_deep_underdark.png board_meta.json; do if [ ! -s "$BD/$b" ]; then echo "[render_gate] FAIL — 取证缺失/零字节: $b"; _rc=1; fi