Commit be82a99a by PLN (Algolia)

fix(gig-up): check-drift was documented as guarding the gate and was never called

Today's buffer clobber should have been caught. It was not, for two reasons that
are each worse than the bug:

1. tools/check-drift.sh was NOT wired into gig-up.sh at all. Grepping this file
   for it returns nothing. The memory note claiming it was wired in was simply
   wrong, and had been trusted since.
2. The script was mode 100644, so invoking it exits 126 (permission denied) —
   the FOURTH occurrence of the chmod-vs-git-mode bug, and the reason the "tools
   executable" check exists. check-drift.sh was not in that check's list either.

A check that exists, is documented as guarding the gate, and is never called is
worse than no check: it buys confidence it does not deliver. That is the same
lesson as the two dead checks found when gig-up was first assembled.

NEW HARD SECTION 1c "surface grid intact", asserting two things:
  * check-drift.sh passes (the committed grid still holds)
  * migrate-columns.py --plan reports 0 moves (the WORKING TREE needs none)

The second is what actually caught today's clobber. When Pulsar wrote its stale
buffer over wap.tidal, d4's octer knobs reverted ^32 -> ^52, undoing a migration
committed and pushed hours earlier. That was invisible in `git status` — the
file just reads as modified, mixed in with PLN's own real edits. What made it
visible was migrate-columns being IDEMPOTENT: 0 moves one minute, 1 move the
next. Any property a tool can re-derive is a property a gate can assert.

PROVEN BY MUTATION, and the first mutation was wrong in a useful way. Flipping
ONE knob ^32 -> ^52 did not trip the check, and that is correct: B4 and C4 are
both legal d4 slots, so two effects merely swapping slots is not drift. The real
clobber put BOTH effects on ^52 — one knob driving two effects — and that trips
it immediately, printing the offending moves. Had I stopped at the green run I
would have shipped a check I believed in for the wrong reason.

Also adds check-drift.sh and take-segments.py to the executable-bit check, and
records 100755 for both in git.
parent 82cb436e
File mode changed from 100644 to 100755
...@@ -225,7 +225,8 @@ run "tools executable" \ ...@@ -225,7 +225,8 @@ run "tools executable" \
bash -c ' bash -c '
bad=0 bad=0
for f in tools/gig-up.sh tools/check-boot.sh tools/check-tracks.sh \ for f in tools/gig-up.sh tools/check-boot.sh tools/check-tracks.sh \
tools/check-preload.sh tools/sc-watchdog.sh tools/setlist.py; do tools/check-preload.sh tools/sc-watchdog.sh tools/setlist.py \
tools/check-drift.sh tools/take-segments.py; do
[ -e "$f" ] || continue [ -e "$f" ] || continue
[ -x "$f" ] || { echo "not executable on disk: $f"; bad=1; } [ -x "$f" ] || { echo "not executable on disk: $f"; bad=1; }
m=$(git ls-files -s "$f" 2>/dev/null | awk "{print \$1}") m=$(git ls-files -s "$f" 2>/dev/null | awk "{print \$1}")
...@@ -247,6 +248,31 @@ run "setlist vs backlog" \ ...@@ -247,6 +248,31 @@ run "setlist vs backlog" \
"tools/setlist.py --emit (edit backlog.md, never the .txt)" \ "tools/setlist.py --emit (edit backlog.md, never the .txt)" \
python3 tools/setlist.py --check python3 tools/setlist.py --check
# --- 1c. the surface grid still holds -----------------------------------------
# HARD. On 2026-08-02 PLN closed Pulsar after a run and its stale buffer silently
# reverted wap.tidal's d4 knobs from ^32 back to ^52 — undoing a column migration
# that had been committed AND pushed hours earlier ([[reference_pulsar_buffer_clobber]]).
#
# check-drift.sh exists precisely for this and was believed to be wired in here.
# It was not: grepping this file for it found nothing, and the script was mode
# 100644 so it exited 126 on invocation. A check that exists, is documented as
# guarding the gate, and is not actually called is worse than no check — it buys
# confidence it does not deliver ([[feedback_assembling_checks_revalidates]]).
#
# The clobber was invisible in `git status` (the file just reads as modified,
# mixed in with PLN's own real edits). What CAUGHT it was migrate-columns being
# idempotent: 0 moves one minute, 1 move the next. So we assert both — the
# committed grid is intact, AND the working tree needs no migration.
run "surface grid intact" \
"tools/check-drift.sh then tools/migrate-columns.py --plan (expect 0 moves)" \
bash -c 'bash tools/check-drift.sh >/dev/null 2>&1 || exit 1
n=$(python3 tools/migrate-columns.py --plan 2>/dev/null \
| sed -n "s/^ *\([0-9]\+\) move(s).*/\1/p" | tail -1)
[ "${n:-0}" = "0" ] || {
echo "migrate-columns wants $n move(s) — a buffer clobber reverts CCs"
python3 tools/migrate-columns.py --plan 2>/dev/null | grep "^ " | head -20
exit 1; }'
# --- 2. the saved Ardour faders ---------------------------------------------- # --- 2. the saved Ardour faders ----------------------------------------------
run "ardour faders" \ run "ardour faders" \
"raise it on the desk, then Ctrl+S in Ardour, then re-run. Still -inf after a save = genuinely down." \ "raise it on the desk, then Ctrl+S in Ardour, then re-run. Still -inf after a save = genuinely down." \
......
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment