Rocky_Mountain_Vending/docs/operations/EBAY_CACHE_DIAGNOSIS.md

1.5 KiB

eBay Cache Diagnosis

Use this when the manuals/parts experience looks empty or stale and you want to know whether the problem is env, Convex, cache data, or the browser UI.

What It Checks

  • Public pages: /, /contact-us, /products, /manuals
  • eBay cache routes:
    • GET /api/ebay/search?keywords=vending machine part
    • POST /api/ebay/manual-parts
  • Notification validation:
    • GET /api/ebay/notifications?challenge_code=...
  • Admin refresh:
    • POST /api/admin/ebay/refresh when an admin token is provided
  • Browser smoke:
    • Loads /manuals
    • Opens the AP parts manual viewer
    • Confirms the viewer or fallback state is visible

How To Run

Local:

pnpm diagnose:ebay

Staging:

pnpm diagnose:ebay --base-url https://rmv.abundancepartners.app --admin-token "$ADMIN_API_TOKEN"

You can skip browser checks if Playwright browsers are unavailable:

SMOKE_SKIP_BROWSER=1 pnpm diagnose:ebay

How To Read The Output

  • NEXT_PUBLIC_CONVEX_URL missing
    • The cache routes will intentionally fall back to status: disabled.
  • cache.status=disabled with Server Error
    • The app reached Convex, but the backend/query layer failed.
  • cache.status=success or idle
    • The cache backend is reachable. If listings are 0, the cache is simply empty.
  • Notification challenge returns 200
    • The eBay validation endpoint is wired correctly.
  • Admin refresh returns 2xx
    • The cache seeding path is available and the admin token is accepted.