Rollback Procedures
Each service in the Foundry stack has its own rollback mechanism. In an incident, identify which service is affected and roll back that service independently.
Vercel (Frontend)
Section titled “Vercel (Frontend)”Vercel maintains a full deployment history. Rollback takes effect immediately with zero downtime.
- Go to Vercel Dashboard -> your project -> Deployments
- Find the last working deployment (green checkmark)
- Click the ”…” menu -> “Promote to Production”
The previous deployment is promoted instantly. No rebuild required. All traffic shifts to the rolled-back version.
Cloudflare Workers (Agent Worker / Sandbox Worker)
Section titled “Cloudflare Workers (Agent Worker / Sandbox Worker)”Via Wrangler CLI
Section titled “Via Wrangler CLI”-
List recent deployments:
Terminal window cd agent-workerwrangler deployments list -
Roll back to a specific deployment:
Terminal window wrangler rollback <deployment-id>
Repeat for sandbox-worker/ if the sandbox worker needs rollback.
Via Dashboard
Section titled “Via Dashboard”- Go to Cloudflare Dashboard -> Workers & Pages -> your worker
- Click the “Deployments” tab
- Select the deployment to roll back to
- Click “Rollback”
Convex (Backend)
Section titled “Convex (Backend)”Convex does not have a one-click rollback button. The safest approach is to redeploy from a known-good commit.
-
Identify the last known-good commit:
Terminal window git log --oneline -20 -
Check out that commit and redeploy:
Terminal window git checkout <good-commit-hash>bunx convex deploy -
Return to your working branch:
Terminal window git checkout main
Preview deployments
Section titled “Preview deployments”For risky schema or function changes, use Convex preview deployments to test before deploying to production:
bunx convex deploy --preview <preview-name>Preview deployments create an isolated Convex instance with its own database. Test against it before promoting to production.
Environment variable rollback
Section titled “Environment variable rollback”If a broken deploy was caused by incorrect environment variables rather than code:
- Go to Vercel project -> Settings -> Environment Variables
- Edit the incorrect variable
- Redeploy (Vercel does not auto-redeploy on env var changes)
bunx convex env set <VARIABLE_NAME> <correct-value>Takes effect immediately — no redeploy needed.
cd agent-worker # or sandbox-workerwrangler secret put <SECRET_NAME># Paste the correct valueTakes effect on next request — no redeploy needed.
Incident response order
Section titled “Incident response order”When multiple services are affected, restore in dependency order:
-
Cloudflare Workers — restore the agent worker and sandbox worker first. Other services depend on their availability.
-
Convex — restore backend functions. The frontend cannot operate without a working backend.
-
Vercel — restore the frontend last. It is the least critical to restore first since the backend and workers must be healthy for it to function.
-
Webhooks — verify webhook endpoints are receiving and processing events. Check the retry queue tables for accumulated failures during the outage.
Monitoring after rollback
Section titled “Monitoring after rollback”After rolling back any service:
- Check Convex function logs for errors. The Convex dashboard shows real-time function invocations with success/failure status.
- Check Cloudflare Worker logs via
wrangler tailfor real-time log streaming. - Verify webhook processing by checking buffer tables (
sourceControlEvents,atlassianWebhookEvents) for events stuck in"pending"status. - Run the verification checklist from the Production Setup page to confirm all services are healthy.