Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.

Commit ffee8e2

Browse files
Spacehunterzclaude
andcommitted
fix: Add SESSION_DOMAIN="" to all test jobs in workflows
Cookie domain=localhost doesn't match TestClient's internal hostname, causing cookies to not be parsed into response.cookies object. Setting SESSION_DOMAIN="" removes the domain attribute, allowing cookies to work with any host. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 28fb33f commit ffee8e2

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/security-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
env:
3939
SESSION_ENCRYPTION_KEY: ${{ secrets.TEST_SESSION_ENCRYPTION_KEY || 'QgL6WE5rriiPpNBid3KZS8XXxMViqgoop57l30nF7n0=' }}
4040
DEV_ACCESS_TOKEN: ${{ secrets.TEST_DEV_ACCESS_TOKEN || 'test-dev-token-for-ci' }}
41+
SESSION_DOMAIN: ""
4142

4243
- name: Upload coverage to Codecov
4344
uses: codecov/codecov-action@v4
@@ -85,6 +86,7 @@ jobs:
8586
env:
8687
SESSION_ENCRYPTION_KEY: ${{ secrets.TEST_SESSION_ENCRYPTION_KEY || 'QgL6WE5rriiPpNBid3KZS8XXxMViqgoop57l30nF7n0=' }}
8788
DEV_ACCESS_TOKEN: ${{ secrets.TEST_DEV_ACCESS_TOKEN || 'test-dev-token-for-ci' }}
89+
SESSION_DOMAIN: ""
8890
REDIS_HOST: localhost
8991
REDIS_PORT: 6379
9092

@@ -116,6 +118,7 @@ jobs:
116118
env:
117119
SESSION_ENCRYPTION_KEY: ${{ secrets.TEST_SESSION_ENCRYPTION_KEY || 'QgL6WE5rriiPpNBid3KZS8XXxMViqgoop57l30nF7n0=' }}
118120
DEV_ACCESS_TOKEN: ${{ secrets.TEST_DEV_ACCESS_TOKEN || 'test-dev-token-for-ci' }}
121+
SESSION_DOMAIN: ""
119122

120123
coverage-check:
121124
name: Coverage Validation
@@ -146,6 +149,7 @@ jobs:
146149
env:
147150
SESSION_ENCRYPTION_KEY: ${{ secrets.TEST_SESSION_ENCRYPTION_KEY || 'QgL6WE5rriiPpNBid3KZS8XXxMViqgoop57l30nF7n0=' }}
148151
DEV_ACCESS_TOKEN: ${{ secrets.TEST_DEV_ACCESS_TOKEN || 'test-dev-token-for-ci' }}
152+
SESSION_DOMAIN: ""
149153

150154
- name: Upload coverage report
151155
uses: actions/upload-artifact@v4

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
env:
9797
SESSION_ENCRYPTION_KEY: ${{ secrets.TEST_SESSION_ENCRYPTION_KEY || 'QgL6WE5rriiPpNBid3KZS8XXxMViqgoop57l30nF7n0=' }}
9898
DEV_ACCESS_TOKEN: ${{ secrets.TEST_DEV_ACCESS_TOKEN || 'test-dev-token-for-ci' }}
99+
SESSION_DOMAIN: ""
99100

100101
frontend-tests:
101102
name: Frontend Tests

apps/dashboard/backend/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ def app():
206206
os.environ["DEV_ACCESS_TOKEN"] = secrets.token_hex(32)
207207
if not os.environ.get("GITHUB_CLIENT_ID"):
208208
os.environ["GITHUB_CLIENT_ID"] = "mock"
209-
if not os.environ.get("SESSION_DOMAIN"):
210-
os.environ["SESSION_DOMAIN"] = "localhost"
209+
# SESSION_DOMAIN must be empty for TestClient - domain=localhost doesn't match testclient's host
210+
os.environ["SESSION_DOMAIN"] = ""
211211
os.environ["ENVIRONMENT"] = "test"
212212

213213
# Import after env vars are set

0 commit comments

Comments
 (0)