ADR-0007: Retire stage.propflowai.co

Context

stage.propflowai.co was a PM2-managed Next.js instance on EC2 35.172.106.96 (port 3001) fronted by a Cloudflare Tunnel. It existed so we could build once, deploy the artifact to stage, run integration + Playwright tests against a live URL, and then promote the same build to prod.

Since Phase 3 landed (PR #154), every GitHub PR now gets an automatic Vercel preview deploy that:

That makes the EC2 stage instance redundant. Keeping it around costs:

Decision

Retire stage.propflowai.co. Specifically:

  1. Drop stage.propflowai.co as a default target from every caller. Replace with a mandatory SMOKE_TARGET_URL env var (a Vercel preview URL) or --target local.
  2. Delete scripts/deploy-stage.sh and scripts/deploy-promote.sh.
  3. Remove the propflowai-stage PM2 app from ecosystem.config.js.
  4. Kill the PM2 process on EC2 (pm2 stop propflowai-stage && pm2 delete propflowai-stage && pm2 save) — see scripts/retire-stage-pm2.sh.
  5. Delete the Cloudflare Tunnel route for stage.propflowai.co and the DNS record — see scripts/retire-stage-cloudflare.sh.
  6. Remove the Cloudflare launchd unit on Fede's Mac (manual step once the tunnel is gone).

Explicitly kept:

Migration

Consequences

Positive:

Negative / trade-offs:

Rollback

If we need stage back:

  1. git revert the Phase 6 commits on main.
  2. pm2 start ecosystem.config.js --only propflowai-stage on EC2 (after restoring the entry in ecosystem.config.js).
  3. Re-add the Cloudflare Tunnel route + DNS record.
  4. Restore the Cloudflare launchd unit on Fede's Mac.

The propflow-stage DynamoDB table + stage Lambda are preserved throughout, so rollback is a config-only restore.