Netlify (netlify.toml) auto-deploys on every push to main, and on the
Personal plan (effective 2026-09-15) each production deploy costs 15 credits
against a 1,000-credit monthly allowance -- roughly 66 deploys/month before
running into overage. .github/workflows/blog-sync.yml runs hourly and can
generate a commit worth pushing (new estate sale, new shop listing, a sold-
status flip, a new video, a new AM Northwest segment, ...) far more often
than that, so pushing is deliberately decoupled from committing.
tools/push-gate.mjs is what actually runs git push, on every hourly
workflow run, deciding per this policy (set 2026-09-15, at the owner's
request, after Netlify's per-deploy credit cost came up):
State lives in tools/push-log.json (an array of ISO push timestamps,
trimmed to the most recent 400). It's the only thing push-gate.mjs trusts
to know "did we already push today" / "how many pushes this month" -- it's
appended to and folded into the commit it's about to push via
git commit --amend, so recording a push never itself costs a deploy.
The monthly count uses the calendar month in Pacific time, not Netlify's exact billing-cycle anchor (currently the 15th) -- simpler to reason about, and still conservative relative to the real 1,000-credit budget.
All five rules and their numbers (9am, 65/month, the 36h/48h throttle
thresholds) live as named constants at the top of tools/push-gate.mjs --
change them there. If the actual Netlify plan/credit cost per deploy
changes, update the math in this file's intro paragraph too.