My repo lied to me for weeks. Two deploy guards caught it. This is the story of why I now dump server bytes before I trust a source file.
The setup
I run my portfolio on a one-shot patch worker pattern: every change ships as a small PHP worker that does a dry run, checks its needles, backs up, patches, verifies, and deletes itself. It's the closest thing a one-person team has to a second set of eyes.
Last week one article was serving the generic OG preview card instead of its own. The cards come from og.php . I have a repo for that tool. I'd built workers against that repo before. I knew the code cold.
Two guards, two aborts
Worker one used exact anchors from the repo source: find this function, patch inside it.
// needle from the repo source $needle = 'function bh_og_build_card(' ; if ( substr_count ( $src , $needle ) !== 1 ) { abort ( 'needle not found' ) ; // β this fired }
Enter fullscreen mode
Exit fullscreen mode
Zero matches. Fine - code drifts.β¦