This is the list of every operational runbook we have, what each one is for and when to reach for it, so nobody runs a script from memory or picks the wrong one for the site in front of them.
Today
Releasing
Runbook
Use it when
Site
Where it is written
./deploy.sh
A change is tested and committed; deploy right away
db/delete-brand.mjs through job brew-ops, or brew-prod-ops once made
A brand asks us to delete its data
Staging; production after the next promote
Data requestsbrew/db/delete-brand.mjs:1-10brew/docs/production.md:95-106
Scripts that no longer fit the site they name
tools/reset-jams.sh edits gs://brew-prototype directly. Staging has kept its records in Postgres since 25 Oct, so it edits the mirror, not the truth. brew/tools/reset-jams.sh:6memory brew-jam-reset
tools/reset-brand.sh and tools/flush-live.sh are bucket era too, but since 26 Oct they exit 3 unless STORAGE=gcs and print the brew-ops command to run instead. brew/tools/reset-brand.sh:11-19brew/tools/flush-live.sh:17-26
Checking
Runbook
Use it when
Site
Where it is written
GitHub Actions workflow test
Every push and pull request runs the deploy test gate on Node 22 with Postgres 17
A Postgres brand reset and deletion, run as brew-ops jobs, on origin/main
v1
Stays
A brew-prod-ops job on production for deletions
v1
New
Retire the three bucket scripts; two already refuse on Postgres
v1
Goes
Every runbook printed from code into this index on each build
v2
New
How we do it
Find the job in the tables above, then open its page. Never run a script from memory.
Check which site the script names before running it. Staging scripts hard-code shopos-feed and brew.joinsquareup.com; production scripts source tools/prod-env.sh.
Run cloud scripts from a clean, detached worktree of origin/main, never the shared checkout:
Job arguments with flags use gcloud's "--args=^:^a:b:c" form. memory brew-prod-backend
When a runbook changes, update its page and this index in the same session.
Numbers
Metric
Definition
Where measured
Runbooks without a page
Scripts in tools/ or db/ that this index does not list
This page against git ls-tree origin/main tools/ db/, Proposed
Stale runbooks
Scripts that target storage the site no longer uses and still run
This page, 1 today, tools/reset-jams.sh
Open
Who may run production runbooks? Today the scripts run with whoever's gcloud sign-in is on the Mac. Proposal: only Param runs promote.sh and the restore runbooks until a second person has done one restore test with him.
Should the bucket scripts be deleted now?tools/reset-brand.sh and tools/flush-live.sh already stop on STORAGE=pg. Proposal: give tools/reset-jams.sh the same first lines, and delete all three once production has run on Postgres for a month.