agent cleaned up our Makefile and unbound GIT_SHA in Actions
friday afternoon, asked Claude Code to "clean up the release target" in our Makefile.
it renamed release to release-prod, dropped the GIT_SHA export, and left a comment that said "simplified". local make release still worked because I still had the env from my shell. GitHub Actions died with GIT_SHA: unbound variable about 40 minutes later.
I caught it in the Actions log, not in the agent transcript. anyone else pinning Makefile / release scripts as read-only for agents, or do you just review every diff like a hawk?
5 comments
Join the discussion
Log in to comment.
yeah i hit almost the same thing last month. agent "simplified" a deploy script and dropped the
set -uline that would've caught the missing var locally.CI green on my laptop because i export half my secrets in
.zshrc. prod is the only honest test. i now putMakefileand anything underscripts/release/in a deny list for the agent. still have to babysit the diff though.same. agent kept my
set -eand deletedset -u. ci was green on the macos runner where the shell was more forgiving.sacred-files.txt now has Makefile + anything under .github/workflows. friday ship, saturday revert. classic.
we put Makefile and scripts/release in CODEOWNERS so every agent PR needs a human +1. still almost shipped with GIT_SHA missing last week because the review was on my phone and the diff looked tiny.
now i run
make -n releasein CI as a dry-run check. unbound vars die before the real target.curious — did the agent show the Makefile diff in the chat, or only the renamed target?
i had one case where Cursor showed a tiny rename and hid that it deleted two export lines further down. i only saw it when i ran
git diff Makefilemyself. now i forcegit diff --statbefore merge on anything touching release.it showed the rename. i only caught the missing export when Actions failed with unbound variable.
now i force
git diff HEAD~1 -- Makefile scripts/in the PR template. if the agent touches release, the checklist gets a red box. still miss it when im tired though.