From 3f696a2aca040fc210620ac502126e38da52c282 Mon Sep 17 00:00:00 2001 From: jaxperro Date: Tue, 21 Jul 2026 13:09:20 -0400 Subject: [PATCH] research: nightly lock uses an absolute path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First run exited 1 after a successful score: the exit trap's relative rmdir ran from the repo root (post-cd) — wrong dir, stale lock left in research/, every future night would have skipped itself. Co-Authored-By: Claude Fable 5 --- research/nightly.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/research/nightly.sh b/research/nightly.sh index c3e94e42..1f0b0e57 100755 --- a/research/nightly.sh +++ b/research/nightly.sh @@ -17,11 +17,15 @@ FRESH_S=$((6 * 3600)) DEADLINE_S=$((8 * 3600)) POLL_S=900 -if ! mkdir .nightly.lock.d 2>/dev/null; then +# ABSOLUTE lock path: the script cd's to the repo root before the git +# steps, so a relative trap rmdir missed the dir entirely (2026-07-21 first +# run: exit 1 + a stale lock that would have skipped every future night). +LOCK="$(pwd)/.nightly.lock.d" +if ! mkdir "$LOCK" 2>/dev/null; then echo "$(date -u +%FT%TZ) already running — skip" >> forward.log exit 0 fi -trap 'rmdir .nightly.lock.d' EXIT +trap 'rmdir "$LOCK"' EXIT tape_age() { "$PY" - <<'EOF'