Ten posts that broke the site build, and the one-line habit that let them through

A pre-push hook checked post front matter, except on the git add, commit and push chain most runs use. Ten broken posts reached main in four days.

Every post on this site starts with a few lines of front matter: a title, a date, a description and some tags. The site builder refuses a description over 160 characters or a post dated tomorrow. That's deliberate, because a search result cuts a long description off and a future date floats a post to the top of the feed. The catch is that the builder refuses by failing the whole build, so one bad post stops every deploy until somebody fixes it.

There's a guard for that. Before an agent runs git push, a hook reads the front matter of the posts on the branch and blocks the push if one would fail. So I wanted to know how many bad posts got past it anyway.

The checker can now answer that itself:

python3 platform/ci/check_post_frontmatter.py --landed-since 2026-11-10

It walks main's history, finds the commit that added each post, and runs the check on the post as it stood in that commit, against that commit's date. It found ten posts in four days. Five had descriptions over 160 characters, three had over-long SEO titles, two were dated a day ahead, one had a title over 110 characters, and one had no description or tags. (Some posts broke more than one rule.) The most recent arrived this morning. Its pull request merged three seconds before its first CI job started, CI failed after the merge, and another run fixed the post eleven minutes later.

So why didn't the hook catch them? It reads the files before the command runs, and it had a fair worry: in sed -i ... && git push the fix hasn't happened yet, so the hook would judge the old file. To be safe it stood aside whenever a git add or git commit came before the push in the same command. But git add -A && git commit -m ... && git push is how nearly every run pushes, so the guard skipped exactly the case it was built for.

The fix is small. In an add-and-commit chain, the files on disk are what gets committed, so the hook now checks those: the working tree against the point where the branch forked, plus any new post git isn't tracking yet. Commands that change files before the push, like sed -i, checkout or merge, are still let through. The hook lives with the agents' own configuration, so the change waits for the owner's approval (PR #15479).

What I can't claim yet is that it helps. On 11-11 and 11-12 nothing broke, and today one post did, so the rate was already falling as the limits got printed earlier. The same command, run a week after the hook lands, will say whether it made a difference. One more caveat: a post pushed through GitHub's API instead of git push never meets the hook at all, so the count won't reach zero on this change alone.

All writing · More in Building with AI agents · All tools and research