Snapshots

Four places Brew runs, and each brand has exactly one home

Settled
  • Production, staging, the demo and a laptop, each with its own release path.
  • All five partners call production home since 25 Oct.
  • Demo mode, AI mock and open sign in never run on production.
  • Two code comments still say Arata's home is staging.
  • Production is released only by promote.sh, behind the clean gate.
5partners homed on production
Your call

Is Arata's home production or staging? Proposal: production, and fix the two comments.

Engineering · 5.4

Environments

DraftLast checked Mon Oct 26Owner Param

Answer

Brew runs in four places, production, staging, the demo and a laptop, and this page settles who uses each, what may run there and how code and brands move between them.

Today

Production Staging Demo Local
Address feed.joinsquareup.com brew.joinsquareup.com demo.joinsquareup.com http://localhost:4200
Cloud Run brew-web + brew-worker shopos-feed brew-demo none
Storage Cloud SQL brew-prod + gs://brew-prod Cloud SQL brew-staging + gs://brew-prototype (mirrored) gs://brew-prototype-demo only .brands/, .tenants/ folders
Who uses it The five design partners and our team Our team, testing Prospects, a sandbox per visitor One developer
AI Gemini: Pro for Plays, Flash for the rest same all Flash AI_MOCK=1
Released by tools/promote.sh only ./deploy.sh tools/deploy-demo.sh node server.js
Admins param@joinsquareup.com only, plus full-access domains joinsquareup.com and shopos.ai three admin emails same as staging DEV_MEMBER=1

Sources: brew/.wt-prod/docs/production.md brew/deploy.sh:39 brew/tools/prod-env.sh:9 brew/tools/deploy-demo.sh brew/README.md

Which site is a brand's home

  • Since 25 Oct (evening) every design partner's home is production: Arata, Nutrova, Mana, PUMA India and Scrubroom. git 119dc8a memory brew-prod-backend
  • Staging lists them in MOVED_TO_PROD: their own people get a 302 (pages) or 409 (API) to production; staff stay. brew/deploy.sh:39 brew/server.js:1119-1124
  • Production's STAGING_HOME does the reverse and is empty. brew/tools/prod-env.sh:9
  • A brand at home on one site gets no background work, outgoing email or Slack, or sign-in renewal from the other. Connector reads keep running on both, so Arata stays connected on both. brew/moved.js:1-8 brew/.wt-prod/docs/production.md
  • Two code comments still say Arata's home is staging again (deploy.sh's smoke list and moved.js's header). They date from commit deb7d90, which 119dc8a reversed 30 minutes later. brew/deploy.sh:51 brew/moved.js:5-6 git deb7d90, 119dc8a
  • Cozy Snugglet and Zenant are our own test brands. Other slugs on staging are leftovers. memory brew-live-stores

What may run where

Rule Production Staging Demo Source
DEMO_MODE, AI_MOCK, /auth/dev, OPEN_SITE, simulated connectors never (clean gate refuses) never on purpose DEMO_MODE=1 brew/db/prod-clean.mjs:1-6 memory prod-clean-only
Test brands and test keys never yes prepared brands only brew/db/prod-clean.mjs:12
Sloosh finals off (Gemini fallback) connected simulated, Dummy git 0fc7cfc brew/DUMMY.md
Simulated teammate replies no no yes, tagged brew/DUMMY.md
Outgoing email yes staff and non-moved brands blocked brew/DUMMY.md brew/moved.js:1-6
Kept exceptions in production Pro plan sheet (no billing), Marketplaces "Coming soon", catalog-photo fallback, Delete my data as an email request memory prod-clean-only

What moves between them

From → to What moves How Source
main → staging code ./deploy.sh from a clean tree of origin/main brew/deploy.sh:7
staging → production the exact image staging runs, by digest tools/promote.sh brew/tools/promote.sh:1-20
staging → production a partner's data, once tools/partner-copy.sh (job brew-partner-copy): rows, parts, vault re-encrypted, binaries; never jams, finals, raw/, spend or test data memory brew-prod-backend
staging → demo a prepared brand's public pack tools/demo-sync.sh <slug> then tools/demo-strip.mjs and a canary memory brew-meta-connector-qa
production → anywhere nothing

Work kept on staging on purpose: the Set-up v2 composer was not promoted as of 25 Oct by Param's choice. memory brew-setup-v2

Local

npm ci
AI_MOCK=1 BUILD_RESUME_OFF=1 RESEARCH_OFF=1 LIVE_OFF=1 TREG_OFF=1 FEED_SIGNIN=0 node server.js

Keys come from ../ugc-factory/.env (override with ENV_FILE). Only test brands serve locally; partners live on production. brew/README.md memory brew-jam-rca-2026-10-26

Tomorrow

Item Version Tag
Production as the only home for real brands v1 Stays
A new production domain to replace feed.joinsquareup.com v2 Changes (domain open)
Staging bucket mirror v2 Goes
Demo on its own Postgres v2 New
Shopify public app pointed at production after review v1 Changes, once Shopify approves
Sloosh connected on production v2 Open, Param's call

How we do it

  1. Test on staging. Deploy right after a change is tested; Param tests on the live staging URL. memory always-deploy-to-test
  2. Release to production only with tools/promote.sh, from a clean checkout of origin/main. See Release and promote.
  3. Run risky tests (disconnects, resets) only on Cozy or Zenant on staging. memory brew-live-stores
  4. Never wipe or reset the five partners. memory brew-live-stores

Numbers

Metric Definition Where measured
Brands per site Brands whose home is each site MOVED_TO_PROD and STAGING_HOME
Staging to production lag Commits on origin/main not yet promoted git log <prod git-sha>..origin/main (Proposed)
Clean gate findings Findings per promote run brew-prod-clean job logs

Open

  1. Is Arata's home production or staging? The settings say production; two comments say staging. Proposal: production, and fix the two comments.
  2. When does production get its own domain? Proposal: keep feed.joinsquareup.com until the brand name is picked, then move with a redirect.
  3. Should Sloosh finals run on production? Proposal: no until the Sloosh workspace has paid credits and Param approves the first quote there.
Sources
  • brew/.wt-prod/docs/production.md
  • brew origin/main: deploy.sh:20-55, tools/prod-env.sh, tools/deploy-demo.sh, tools/promote.sh, moved.js:1-15, server.js:1119-1124, db/prod-clean.mjs:1-30
  • brew origin/main: README.md 'Run it locally', DUMMY.md rows 1, 5, 6, 8
  • brew origin/main git log: deb7d90, 119dc8a, 41b0258 (25 Oct, which site is home)
  • memory brew-prod-backend, prod-clean-only, brew-live-stores, brew-demo-mode, always-deploy-to-test, brew-setup-v2

Source file content/engineering/environments.md · For agents: Markdown · JSON