Skip to content
Bryan Hamilton edited this page Nov 7, 2026 · 1 revision

Guarded Deploy Workers - Wiki The README sells the pattern; this wiki is the deep documentation. Start here:

Core pages

  • Anatomy of a needle - how to choose anchor strings that match exactly once, byte-exact, every time
  • Cache-aware verification - why "the patch didn't work" is usually stale cache, and how to prove which layer is lying
  • Failure modes - the real ways one-shot patches die, and the guard that catches each one
  • The checklist, annotated - every rule from docs/checklist.md with the why and a worked example

The pattern in one paragraph

You have a production file on shared hosting, no shell, and no pipeline. You write a tiny PHP script that: token-gates itself, checks a marker so it can never patch twice, requires every anchor string to appear exactly once, backs up the target, applies the change, verifies the change actually landed, restores on any failure, reports, and deletes itself. The class in src/GuardedWorker.php implements the guards so your worker script only states intent.

Who this is for

Anyone deploying to cPanel-style shared hosting where the deploy log is a chat thread and the deployment pipeline is a file manager. Battle-tested across months of live deploys on a production site with LiteSpeed caching, opcache lag, and a thousand crawlable pages.

Clone this wiki locally