Repository navigation
test(e2e): live provider journeys, production canary, and required checks #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b2751c2
test(e2e): add live provider journeys and a production canary
Programcode 1279d7c
ci(db-gate): show why supabase start failed before retrying
Programcode 11791ac
test(e2e): require complete live streams and live Jev signals
Programcode 7f3661d
test(canary): check the method and headers a browser preflight needs
Programcode 2f83384
docs(agents): scope the production canary credential exception
Programcode 59487a7
fix(crossfire): stop sending client-only turn signals to the server
Programcode 1116a7f
test(full-stack): cover billing, promo codes, data erasure, and exports
Programcode 2239f7a
test(live): generate a case with every catalog model
Programcode 949e918
test(canary): generate a production case and keep AI checks within th…
Programcode de4264d
ci(model-matrix): run weekly; one run costs about $1
Programcode b2df5eb
test(canary): check the signed-in app on every production deployment
Programcode fc6b9a4
fix(ai): give provider calls the time research leaves, not a fixed 60 s
Programcode 3334dc2
fix(ai): keep a finished case when the source-usage check runs late
Programcode f0868bb
test(ai): cover request budget and balanced routing
Programcode d955a58
test(canary): require complete streamed answers
Programcode 26cc3f7
docs(testing): keep canary identity private
Programcode 6455bba
docs(testing): describe the shared AI request budget
Programcode da2782f
test(live): use balanced multi-provider routing
Programcode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: Live provider E2E | ||
|
|
||
| # Real OpenRouter, Jev, and Exa behind the local stack. Runs on pull requests, | ||
| # nightly to catch provider drift without code changes, and on demand. | ||
| on: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "17 3 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: live-e2e-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| live-e2e: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Set up Supabase CLI | ||
| uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 | ||
| with: | ||
| version: 2.116.0 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Install Chromium | ||
| run: npx playwright install --with-deps chromium | ||
|
|
||
| # db-gate.sh fails before starting anything when either key is missing. | ||
| # Accepted risk (2026-09-24): pull-request code runs with these keys, so | ||
| # anyone who can push a branch here could read them. Keep them low-limit. | ||
| - name: Live provider journeys | ||
| env: | ||
| LIVE_PROVIDERS: 1 | ||
| # Repository variable override; empty falls back to db-gate.sh's default. | ||
| LIVE_MODEL: ${{ vars.LIVE_MODEL }} | ||
| LIVE_OPENROUTER_API_KEY: ${{ secrets.LIVE_OPENROUTER_API_KEY }} | ||
| LIVE_EXA_API_KEY: ${{ secrets.LIVE_EXA_API_KEY }} | ||
| SUPABASE_INTERNAL_IMAGE_REGISTRY: public.ecr.aws | ||
| WORKSPACE_GATE_ARTIFACT_ROOT: ${{ runner.temp }}/workspace-gate | ||
| run: ./.superset/db-gate.sh | ||
|
|
||
| - name: Upload live failure artifacts | ||
| if: failure() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: live-e2e-failure-${{ github.run_id }} | ||
| path: | | ||
| ${{ runner.temp }}/workspace-gate/ | ||
| test-results/ | ||
| playwright-report/ | ||
| if-no-files-found: ignore | ||
| retention-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Model matrix | ||
|
|
||
| # Generates one case with every model in the catalog, unpinned, so a model that | ||
| # times out or returns invalid JSON fails here before users hit it. One run | ||
| # costs about $1, so it runs weekly and when model routing, prompts, or the ai | ||
| # function change. | ||
| on: | ||
| pull_request: | ||
| paths: | ||
| - supabase/functions/_shared/** | ||
| - supabase/functions/ai/** | ||
| - src/lib/ai/** | ||
| - e2e/model-matrix/** | ||
| - .github/workflows/model-matrix.yml | ||
| schedule: | ||
| - cron: "29 4 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: model-matrix-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| model-matrix: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Set up Supabase CLI | ||
| uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0 | ||
| with: | ||
| version: 2.116.0 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Install Chromium | ||
| run: npx playwright install --with-deps chromium | ||
|
|
||
| # db-gate.sh fails before starting anything when either key is missing. | ||
| # Accepted risk (2026-09-24): pull-request code runs with these keys, so | ||
| # anyone who can push a branch here could read them. Keep them low-limit. | ||
| - name: Case generation with every catalog model | ||
| env: | ||
| LIVE_PROVIDERS: 1 | ||
| LIVE_MODEL: as-requested | ||
| LIVE_OPENROUTER_API_KEY: ${{ secrets.LIVE_OPENROUTER_API_KEY }} | ||
| LIVE_EXA_API_KEY: ${{ secrets.LIVE_EXA_API_KEY }} | ||
| SUPABASE_INTERNAL_IMAGE_REGISTRY: public.ecr.aws | ||
| WORKSPACE_GATE_ARTIFACT_ROOT: ${{ runner.temp }}/workspace-gate | ||
| run: ./.superset/db-gate.sh | ||
|
|
||
| - name: Upload live failure artifacts | ||
| if: failure() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: model-matrix-failure-${{ github.run_id }} | ||
| path: | | ||
| ${{ runner.temp }}/workspace-gate/ | ||
| test-results/ | ||
| playwright-report/ | ||
| if-no-files-found: ignore | ||
| retention-days: 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Production canary | ||
|
|
||
| # Checks the live site after every Vercel production deployment and daily. | ||
| # Read-only on deployments. The daily and manual runs also make two real AI | ||
| # requests (a streamed Ask and a case) as the dedicated canary account. | ||
| on: | ||
| deployment_status: | ||
| schedule: | ||
| - cron: "41 6 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: production-canary | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| canary: | ||
| if: >- | ||
| github.event_name != 'deployment_status' || | ||
| (github.event.deployment_status.state == 'success' && github.event.deployment.environment == 'Production') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: 22 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Install Chromium | ||
| run: npx playwright install --with-deps chromium | ||
|
|
||
| - name: Production canary | ||
| env: | ||
| PROD_SUPABASE_ANON_KEY: ${{ vars.PROD_SUPABASE_ANON_KEY }} | ||
| PROD_CANARY_EMAIL: ${{ secrets.PROD_CANARY_EMAIL }} | ||
| PROD_CANARY_PASSWORD: ${{ secrets.PROD_CANARY_PASSWORD }} | ||
|
greptile-apps[bot] marked this conversation as resolved.
Resolved
|
||
| CANARY_AI_REQUESTS: ${{ github.event_name != 'deployment_status' }} | ||
|
greptile-apps[bot] marked this conversation as resolved.
Resolved
greptile-apps[bot] marked this conversation as resolved.
Resolved
|
||
| run: npx playwright test --config=playwright.production.config.ts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.