diff --git a/.github/workflows/prod-canary.yml b/.github/workflows/prod-canary.yml index 2b1a582e8..40f5f67bd 100644 --- a/.github/workflows/prod-canary.yml +++ b/.github/workflows/prod-canary.yml @@ -18,9 +18,14 @@ concurrency: jobs: canary: + # Vercel names the deployment environment after the project. The live site + # is debate-navigator; debatelab-staging's "production" is staging, so it + # must not start the canary. Plain 'Production' is the pre-2026-10 name. if: >- github.event_name != 'deployment_status' || - (github.event.deployment_status.state == 'success' && github.event.deployment.environment == 'Production') + (github.event.deployment_status.state == 'success' && + (github.event.deployment.environment == 'Production – debate-navigator' || + github.event.deployment.environment == 'Production')) runs-on: ubuntu-latest timeout-minutes: 15 steps: diff --git a/docs/testing.md b/docs/testing.md index 33dab4898..0a808b87b 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -293,7 +293,7 @@ npx playwright test --config=playwright.production.config.ts The last two checks are the only production writes, and they touch only the canary account: its `ai_requests` usage rows and whatever the Generate page saves for it. The dedicated canary account has Pro promo access capped at 10 requests a day. Captures are disabled because they could retain its session. -`.github/workflows/prod-canary.yml` runs after every successful Vercel `Production` deployment, daily at 06:41 UTC, and on demand. Main can deploy more than 10 times a day, so deployment runs set `CANARY_AI_REQUESTS=false` and skip the two AI checks. The signed-in session check still runs on every deployment. Only the daily and manual runs make real AI requests: two per run, plus at most two retries. It reads the password and email from secrets and the public anon key from the `PROD_SUPABASE_ANON_KEY` repository variable. +`.github/workflows/prod-canary.yml` runs after every successful Vercel production deployment of the `debate-navigator` project (GitHub environment `Production – debate-navigator`; the `debatelab-staging` project's production deployments do not start it), daily at 06:41 UTC, and on demand. Main can deploy more than 10 times a day, so deployment runs set `CANARY_AI_REQUESTS=false` and skip the two AI checks. The signed-in session check still runs on every deployment. Only the daily and manual runs make real AI requests: two per run, plus at most two retries. It reads the password and email from secrets and the public anon key from the `PROD_SUPABASE_ANON_KEY` repository variable. The local stack begins at port `54321` and is not parallel-safe across worktrees. The task that starts it must stop it before finishing or abandoning the run. Use `supabase stop --no-backup` unless another active task explicitly owns the same stack.