[object Object]

← back to Codex Yolo

Fix smoke-fail revert dropping an unrelated commit (reset to HEAD, not HEAD~1)

b91246fff56569671bf69973a95481fccf66318e · 2026-05-18 20:15:00 -0700 · SteveStudio2

Files touched

Diff

commit b91246fff56569671bf69973a95481fccf66318e
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 18 20:15:00 2026 -0700

    Fix smoke-fail revert dropping an unrelated commit (reset to HEAD, not HEAD~1)
---
 scripts/yolo-overnight.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/yolo-overnight.sh b/scripts/yolo-overnight.sh
index 1757925..e5ec06c 100755
--- a/scripts/yolo-overnight.sh
+++ b/scripts/yolo-overnight.sh
@@ -76,7 +76,11 @@ while [ $iter -lt $MAX_ITER ] && [ $(date +%s) -lt $DEADLINE ]; do
     # 3) Smoke test
     if ! bash "$ROOT/scripts/smoke-test.sh" "$t" >> "$LOG" 2>&1; then
       echo "[yolo] $t SMOKE FAILED → reverting"
-      cd "$PROJ" && git reset -q --hard HEAD~1 2>/dev/null || git reset -q --hard HEAD
+      # Trivial patches were applied to tracked files in the working tree but
+      # not yet committed (commit happens only on a passing smoke below).
+      # Discard the uncommitted patches only — never reset past HEAD, which
+      # would drop unrelated commits. Untracked _yolo_patches/ diffs are kept.
+      cd "$PROJ" && git reset -q --hard HEAD
       FAIL_COUNT_FILE="$RUN_DIR/$t.fail-count"
       F=$(cat "$FAIL_COUNT_FILE" 2>/dev/null || echo 0)
       F=$((F+1))

← d058d90 Fix sibling-directory path-escape bypass and remove dead cod  ·  back to Codex Yolo  ·  chore: macstudio3 migration — reconcile from mac2 + repoint 9f19a27 →