fix(ci): set stub ANTHROPIC_API_KEY for e2e job so AI-gated endpoints respond
POST /api/v1/ai-sessions and friends call _require_ai_enabled(), which returns 503 when no provider key is set. The new prefill-handoff regression test (e2e/assistant-chat-prefill.spec.ts) drives the dashboard prefill flow, which has to create a chat session before its page.route stub on /chat can fire — so without a key, session creation 503s and the test never sees the task lane. The Playwright stub intercepts /chat in the browser, so the backend never actually contacts Anthropic — but the AI-enabled gate still needs to pass. A stub value is enough. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -161,6 +161,12 @@ jobs:
|
||||
PLAYWRIGHT_SECRET_KEY: ci-playwright-secret-key
|
||||
PLAYWRIGHT_TEST_EMAIL: teamadmin@resolutionflow.example.com
|
||||
PLAYWRIGHT_TEST_PASSWORD: TestPass123!
|
||||
# AI-touching endpoints (POST /ai-sessions, /chat, /respond, etc.) are
|
||||
# gated by `_require_ai_enabled()`, which returns 503 when no provider
|
||||
# key is set. Tests that exercise those flows stub the AI calls in the
|
||||
# browser via `page.route`, so the backend never actually contacts
|
||||
# Anthropic — but the gate still has to pass. A stub value is enough.
|
||||
ANTHROPIC_API_KEY: ci-stub-key-not-used-by-tests
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user