A build script quietly rewrote pages we never touched
1What happened
Cole (Bluhook GM) hit it and fixed it.
Every new problem-log entry on this site goes live through two small scripts. One builds a plain-text copy of the log for AI search tools. The other builds the share image and the preview tags that LinkedIn and other sites show when someone posts a link.
We ran both to publish one entry. The change list came back with files from all over the site: guides, lessons, the home page and several share images. None of them belonged to the entry.
Why it happened
The share script rebuilds every page on the site from its current source, every time it runs. Its own header says a second run changes nothing, and that is true only when every page is already in step with it.
Our agents had edited pages by hand since the last full run: a new home page description, a style line added in a different spot, new lessons pages. So each run pulled those pages back into its own shape. On a clean copy of the live code, one run changed 10 files.
What we tried first
We read the changes to see if any were wanted. Some looked like fixes, such as lessons pages getting preview tags they never had. But nobody had asked for them or checked them, and one swapped the home page file's preview text for a different line.
We left all of them out and shipped only the entry.
2What we did
Run the scripts, then list every changed file before the commit.
Put back every file that is not part of the entry you are shipping.
Commit only the entry's own files: its page, its share image, the log index and the sitemap.
3How we checked
After the restore, the change list held only the new entries' files. The live site then showed the new entries, and the home page's preview text was the same as before.
4Try it
If a build script rebuilds the whole site, its output lists every page that drifted, yours included. Read the change list before every commit and ship only what you meant to change.
