staging-e2e
Markdown file
docs/runbooks/staging-e2e.md
Staging end-to-end checklist (Render + Neon + Upstash)
Goal: validate the full loop works in a live environment: embedded UI → OAuth/session → jobs → worker processing → results → apply/audit → revert.
Prereqs
- Render services are healthy:
- Web health:
GET /healthreturns 200{"ok":true} - Worker is running (able to process BullMQ jobs)
- Web health:
- Env vars are set on both Render services:
DATABASE_URL(Neon)REDIS_URL(Upstash)- Shopify + session secrets (
SHOPIFY_API_KEY,SHOPIFY_API_SECRET,SHOPIFY_APP_URL,SCOPES,SESSION_SECRET) - AI key (
OPENAI_API_KEYorANTHROPIC_API_KEY)
Expected access behavior (important)
- Hitting the Render URL directly will typically redirect you to
/auth/login. /appaccessed outside of the Shopify embedded context may return “gone”/error responses. That’s expected; use Shopify Admin (embedded) or start OAuth from/auth/login.
0) Baseline: confirm web is up
- Visit
/health - Expected: 200 JSON
{"ok":true}
1) Install + OAuth
- Start at
/auth/login - Enter your dev store domain (e.g.
your-store.myshopify.com) and continue OAuth - Expected outcomes:
- App is installed on the store
- You land in the embedded app UI
- Web logs show successful auth (and webhook registration runs post-auth)
2) Onboarding: sync products (creates local catalog)
- In the embedded app, open “Get Started” / onboarding and run “Sync products”.
- Expected outcomes:
- Web logs include:
[queue] enqueued sync-products ... - Worker logs include:
Processing job sync-products (...)then completion - Shopify bulk operation webhook fires and web logs include:
Received BULK_OPERATIONS_FINISH webhook...[queue] enqueued process-bulk-results ...
- Worker logs include:
Processing job process-bulk-results (...)andProcessed N products... - App product list shows local SEO score fields populated after analysis runs (next step)
- Web logs include:
3) Analyze a small set of products (suggest-only)
- Go to Products
- Select 1–3 products and click Analyze
- Expected outcomes:
- Web logs include:
[queue] enqueued analyze-batch ... size=... - Worker logs include:
Processing job analyze-batch (...) - In DB/UI, each product gains:
lastAnalyzedAt,seoScore,seoIssuessuggestionsrows withstatus=PENDING(if issues found)
- Web logs include:
4) Review suggestions, apply changes, verify audit trail
- Open a specific product detail page and review the “Pending” suggestions.
- Apply one suggestion (or “Apply all” for that product).
- Expected outcomes:
- Web logs include:
[queue] enqueued apply-suggestions ... - Worker logs include:
Processing job apply-suggestions (...)then completion - Shopify product fields change (title/description/SEO/tags depending on suggestion fields)
- App shows:
- suggestions become
APPLIED(orFAILEDif Shopify rejected an update) - an audit entry exists (ChangeLog)
- suggestions become
- Web logs include:
5) Revert
- On product detail, click Revert.
- Expected outcomes:
- Web logs include:
[queue] enqueued revert-product ... - Worker logs include:
Processing job revert-product (...)then completion - Shopify product restores prior values
- App audit shows the revert entry and restored fields
- Web logs include:
6) Automation sanity check (webhook → queue → worker)
- Enable automation triggers for product create/update (start in “Suggest only”).
- Create or update a product in Shopify.
- Expected outcomes:
- Web logs show webhook receipt and queueing:
Received PRODUCTS_CREATE/UPDATE webhook...[queue] enqueued analyze-product ... (product create/update)
- Worker logs show
Processing job analyze-product (...) - Suggestions appear in the product detail UI for the affected product
- Web logs show webhook receipt and queueing:
Quick failure triage
- If web shows queue-enqueue logs but worker shows nothing:
- Redis URL/TLS mismatch, worker not running, or wrong env vars on worker service.
- If worker processes but UI doesn’t show results:
- Confirm the same
DATABASE_URLis set for both services; check Prisma writes; refresh product page.
- Confirm the same
- If you get blocked by billing screens:
- Confirm
SCOPESincludeswrite_applications_billingand the store accepted the plan.
- Confirm