Different Hunger

Operations

Resource Discipline — Run Only Real Brands

Automation never runs against demo/seed/test brands. Real, active brands only. The rule that prevents cost blowouts taking the whole stack down.

Resource Discipline — Run Only Real Brands

THE RULE: No automated code — crons, fan-out jobs, scheduled queries — ever runs across all brands. It runs against real, active brands only. Demo, seed, template, and test brands are quarantined from all execution. Running code on brands that aren't real businesses is banned.

Why this exists (the 2026-06-20 incident)

The daily crons fanned out over 87 brands with ?all=1 — but only ~5 were real businesses (mcm, dh, studio, lateral, ventures). The other ~80 were auto-seeded demo/seed/template rows. The result:

  • Supabase: egress hit 6.36 / 5 GB (127%) → the database was restricted → the entire app went down (522 on every query).
  • Vercel: free Fluid Active CPU hit 100% (4 hrs) → projects flagged for auto-pause.
  • Two daily fan-out jobs (ads/collect, pulse/collect) × 87 brands = ~160 wasted brand-runs every day, most against brands that don't exist.

Running automation on non-existent brands took the whole production stack offline. This must never recur.

The standard

  1. Definition of a real brand. A brand is eligible for automation only if status = 'active' and it has real intake/config (not a seed, template, demo, or placeholder). _template, demo, brand-zero, 0-hour-studio, and auto-seeded rows are not real brands.
  2. No blind fan-out. ?all=1 must resolve to real brands, never every row in the table. Every cron and every fan-out query filters to the real-brand set (status filter or an explicit allowlist). A query that selects all brands indiscriminately is a defect.
  3. Quarantine non-real brands. Demo/seed/test brands are excluded from every cron, queue, and scheduled query by construction.
  4. Daily fan-out is banned. Collection/report jobs run weekly at most, scoped to real brands. Daily-across-all-brands is never acceptable.
  5. Cost meters are system health. Supabase egress and Vercel CPU are first-class signals. Trim queries (select only needed columns, paginate, cache read-heavy endpoints). A balance-watch should alert before a free/paid cap is hit, not after the stack is down.

Acceptance

  • Every scheduled job names its brand scope explicitly and that scope contains zero demo/seed/test brands.
  • A monthly egress + CPU review confirms usage tracks real-brand count, not table size.
  • New seed/demo data is created with a flag that excludes it from automation from the moment it exists.