The libx264 preflight piped `ffmpeg -encoders` straight into `grep -q`. grep exits at the first match, ffmpeg takes a SIGPIPE, and `set -o pipefail` turns that into a failed check. Whether it trips depends only on how much ffmpeg manages to write before grep leaves, so the check rejected precisely the ffmpeg builds that satisfy the requirement. This was not a rare configuration. `nix develop`, which flake.nix describes as the "Sigil reproducible Linux host proof environment", ships ffmpeg-headless with 223 encoders including libx264 and libx264rgb -- and the proof failed there every time with "ffmpeg does not provide the required libx264 encoder". So loopback-proof.sh could not run on Linux in the project's own sanctioned proof shell. It passed on macOS only because that ffmpeg's shorter output won the race with grep. Capture the encoder list first, then match it. Verified on the Linux host: the three-viewer proof and the focus-handoff proof both now reach loopback_proof=ok with neutral_before_successor=ok.
- commit
- 1fe6c4b7a1c1825bde0373c856ce451bf54a956b
- parent
- 21a5aeb2599905ada964fafd31b60314436afc98
- author
- Dami <dami.etoile@gmail.com>
| M | scripts/ | 8 | +++++++- |
@@ -305,7 +305,13 @@ fi
305305 command -v cargo >/dev/null 2>&1 || die "cargo is required"306306 ffmpeg_bin="$(command -v ffmpeg || true)"307307 [[ -n "$ffmpeg_bin" ]] || die "ffmpeg is required"308-if ! "$ffmpeg_bin" -hide_banner -encoders 2>/dev/null | grep -q '[[:space:]]libx264[[:space:]]'; then308+# Capture the encoder list before matching. Piping it straight into `grep -q`309+# lets grep exit on the first hit, which hands ffmpeg a SIGPIPE, and `pipefail`310+# then reports the whole probe as failed. A full ffmpeg build emits enough311+# encoders to lose that race every time, so the check rejected exactly the312+# builds that do provide libx264.313+ffmpeg_encoders="$("$ffmpeg_bin" -hide_banner -encoders 2>/dev/null || true)"314+if ! grep -q '[[:space:]]libx264[[:space:]]' <<<"$ffmpeg_encoders"; then309315 die "ffmpeg does not provide the required libx264 encoder"310316 fi311317