diff --git a/game/tests/.gates/.gitignore b/game/tests/.gates/.gitignore new file mode 100644 index 00000000..145f1aa6 --- /dev/null +++ b/game/tests/.gates/.gitignore @@ -0,0 +1,4 @@ +# 本目录只入库 baseline.json(存量基线,需随代码走以保证各 worktree 判定口径一致)。 +# receipt.json 是每跑批覆写的当次回执、*.log 是跑批当场日志——两者都是中间产物,不入库。 +receipt.json +*.log \ No newline at end of file diff --git a/game/tests/.gates/receipt.json b/game/tests/.gates/receipt.json deleted file mode 100644 index 675463a1..00000000 --- a/game/tests/.gates/receipt.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "commit": "1d4ac91e3bda95048e65b7ac17c29a8e6198b80f", - "commit_short": "1d4ac91e", - "timestamp": "2026-10-15T21:42:07+08:00", - "quick_mode": false, - "first_baseline_run": true, - "gates": [ - { - "name": "01 冒烟全量", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "02 单元套件", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "03 探针 --click", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "04 探针 --full", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "05 渲染闸", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "06 gdd_lint", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "07 doc_link", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "08 doc_term", - "exit": "0", - "fingerprint": "green" - }, - { - "name": "09 静态扫描", - "exit": "1", - "fingerprint": "3220614b09c4" - }, - { - "name": "10 熵增闸", - "exit": "0", - "fingerprint": "green" - } - ], - "changed_vs_baseline": [], - "inherited_red": [], - "all_green": true -} \ No newline at end of file diff --git a/tools/run_all_gates.sh b/tools/run_all_gates.sh index c86f7466..3035105b 100644 --- a/tools/run_all_gates.sh +++ b/tools/run_all_gates.sh @@ -28,6 +28,15 @@ QUICK=0 [ "${1:-}" = "--quick" ] && QUICK=1 [ $# -gt 1 ] && { echo "用法: tools/run_all_gates.sh [--quick]"; exit 2; } +# 回执与日志是中间产物(不入库),但 .gitignore 本身必须入库——漏了就等于把它们纳入版本管理。 +# 每次跑批前自愈重建,避免「清目录重跑」把 .gitignore 一起带走(2026-10-15 实踩)。 +mkdir -p "$STAMP_DIR" +if [ ! -f "$STAMP_DIR/.gitignore" ]; then + printf '# 本目录只入库 baseline.json(存量基线,需随代码走以保证各 worktree 判定口径一致)。\n# receipt.json 是每跑批覆写的当次回执、*.log 是跑批当场日志——两者都是中间产物,不入库。\nreceipt.json\n*.log\n' \ + > "$STAMP_DIR/.gitignore" + echo "[gates] 已自愈重建 $STAMP_DIR/.gitignore" +fi + # ── python 解释器解析:优先带 PIL 的 gamedev venv(渲染闸的 shot_checker/golden_compare 依赖), # 回落 PATH 上的 python。渲染闸的三个脚本要 PIL,用错解释器会假红。 PY="" @@ -44,7 +53,6 @@ case "$PY" in */Scripts/python.exe|*/Scripts/python) export PATH="$(dirname "$PY"):$PATH" ;; esac -mkdir -p "$STAMP_DIR" declare -a NAMES=() EXITS=() LOGS=() FAILED=0