AudioLasso

Production checklist

Deploy and verify every AudioLasso control-plane and worker dependency before sending production traffic.

AudioLasso spans three independently deployed runtimes: the Next.js API, Convex state, and the Modal GPU worker. A Git push alone does not deploy all three.

1. Configure production secrets

Set the production values described in .env.example. At minimum, verify:

  • NEXT_PUBLIC_SITE_URL, Better Auth, and Convex deployment values.
  • API_KEY_PEPPER; keep it stable because it protects API keys and encrypted webhook delivery secrets.
  • AUTUMN_SECRET_KEY.
  • all four R2 variables.
  • MODAL_SUBMIT_URL, MODAL_STATUS_URL, and MODAL_CANCEL_URL.
  • a long random CRON_SECRET shared with the scheduled reconciler.

Never copy a development API key or webhook secret into logs or deployment output.

2. Deploy in dependency order

# GPU worker and queue endpoints
modal deploy modal/modal_app.py

# schema, indexes, mutations, and queries
pnpm exec convex deploy

# Next.js API, cron route, docs, SDK metadata, and OpenAPI
vercel --prod

Confirm the deployed Modal URLs match the production environment. Convex code generation or a dry run validates source compatibility but does not deploy it.

3. Run acceptance checks

  1. Call GET /v1/health and require 200 with status: "healthy".
  2. Create an upload with POST /v1/files, upload the exact declared byte length, and confirm the file becomes uploaded.
  3. Submit a short fixture with a stable Idempotency-Key, then repeat the identical request and confirm the same request_id plus Idempotent-Replayed: true.
  4. Poll status_url to COMPLETED, fetch result_url, and download both target and residual outputs before their retention deadline.
  5. Submit another fixture, cancel it, and confirm the terminal state is CANCELED.
  6. Verify a signed webhook using the raw body, then confirm a forced non-2xx response is retried.
  7. Confirm the completed job reports usage.billing_status: "deducted"; investigate pending rather than treating it as settled.
  8. Wait for the cron reconciler to run and verify its logs show authenticated execution.

Use staging media that is safe to retain temporarily. Production output objects are deleted after 24 hours.

4. Monitor the real seams

  • API: X-Request-Id, response status, latency, and 429 volume.
  • Queue: age of IN_QUEUE and IN_PROGRESS jobs, cancellations, and 30-minute deadline failures.
  • Storage: signed upload failures, file-size mismatches, direct worker uploads, and retention cleanup.
  • Billing: reserved usage, settlement retries, and usage.billing_status.
  • Webhooks: attempt count, last status code, and undelivered terminal events.

Polling the queue remains the source of truth even when an integration also uses streams or webhooks.