You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update staging auth instructions to use smoke test token
Replace references to demo-credentials.md for staging login with the
smoke test token flow via SAM_PLAYWRIGHT_PRIMARY_USER env var and
POST /api/auth/token-login. Production auth still uses GitHub OAuth.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/rules/02-quality-gates.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,7 @@ String containment tests on structured output create false confidence. The test
203
203
**Full details in `.claude/rules/13-staging-verification.md`.** Summary of the hard requirements:
204
204
205
205
1.**Staging deployment MUST be green.** The `Deploy Staging` workflow is manual — you must trigger it via `gh workflow run deploy-staging.yml --ref <branch>`. Check for existing active runs first and wait at least 5 minutes if one is in progress. A failed staging deployment is the same severity as a failed test — it blocks merge.
206
-
2.**Live app MUST be verified via Playwright.** After staging deploys, log into`app.sammy.party` (staging — NOT `app.simple-agent-manager.org`, which is production) using test credentials at `/workspaces/.tmp/secure/demo-credentials.md`, and actively test the application.
206
+
2.**Live app MUST be verified via Playwright.** After staging deploys, authenticate to`app.sammy.party` (staging — NOT `app.simple-agent-manager.org`, which is production) using the smoke test token in `SAM_PLAYWRIGHT_PRIMARY_USER` env var via `POST https://api.sammy.party/api/auth/token-login` with body `{ "token": "<value>" }`, then navigate and actively test the application. See `.claude/rules/13-staging-verification.md` for the full login procedure.
207
207
3.**Existing workflows MUST be confirmed working.** Navigate the dashboard, projects, settings. Verify no regressions — pages load, data displays, navigation works, no new console errors.
208
208
4.**New feature/fix MUST be verified on staging.** The specific changes in the PR must work correctly on the live staging environment.
209
209
5.**Evidence MUST be reported.** Include screenshots, API responses, or Playwright observations in the PR.
@@ -213,7 +213,7 @@ String containment tests on structured output create false confidence. The test
213
213
- A "small refactor" still deploys and verifies — prove no behavior changed
214
214
- A "fix for broken staging" is the STRONGEST reason to verify — confirm the fix works
215
215
- "Tests pass" is not sufficient — tests passed for bugs that only manifested in the real environment
216
-
- If you cannot authenticate, ask the human — do NOT skip verification
216
+
- If you cannot authenticate (e.g., `SAM_PLAYWRIGHT_PRIMARY_USER` env var not set), ask the human — do NOT skip verification
217
217
218
218
## Post-Push CI Procedure (Required)
219
219
@@ -227,6 +227,6 @@ After ANY merge to main, the production deployment triggers automatically. You M
227
227
228
228
1. Wait for the Deploy Production workflow to complete successfully in GitHub Actions.
229
229
2. Use Playwright to navigate to `app.simple-agent-manager.org` (production) and test the deployed feature end-to-end.
230
-
3.Use the test credentials stored at `/workspaces/.tmp/secure/demo-credentials.md`to authenticate. If the file is missing, ask the human for credentials.
230
+
3.Authenticate using GitHub OAuth credentials at `/workspaces/.tmp/secure/demo-credentials.md`(production uses GitHub OAuth, not smoke test tokens). If the file is missing, ask the human for credentials.
231
231
4. If the feature cannot be tested via Playwright, document why and what was verified manually.
232
232
5. Report results to the user — do not assume deployment success just because CI passed.
// Verify login succeeded (status 200, response has success: true)
74
+
```
75
+
- The `SAM_PLAYWRIGHT_PRIMARY_USER` env var contains the smoke test token
76
+
- If the env var is not set, ask the human — do NOT skip this step
77
+
2. Navigate to `https://app.sammy.party` (staging) — the session cookie from step 1 authenticates you
68
78
3. Verify your changes work as intended (see verification checklists below)
69
79
4. Verify existing core workflows still work (see regression checklist below)
70
80
@@ -128,7 +138,7 @@ If you find a bug unrelated to your PR, file it as a backlog task (`tasks/backlo
128
138
-**App doesn't load** → fix the issue, do not merge
129
139
-**Your feature doesn't work on staging** → fix the issue, do not merge
130
140
-**Existing workflow is broken** → investigate whether your PR caused it; if yes, fix it; if pre-existing, file a backlog task but still do not merge with NEW regressions
131
-
-**Cannot authenticate** → ask the human for credentials, do not skip verification
141
+
-**Cannot authenticate** → check that `SAM_PLAYWRIGHT_PRIMARY_USER` env var is set; if not, ask the human — do not skip verification
132
142
133
143
## Feature-Specific Verification Is Mandatory (Not Just Page Loads)
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,7 +156,8 @@ Claude Code supports dual authentication: **API keys** (pay-per-use from Anthrop
156
156
157
157
## Testing
158
158
159
-
-**Test credentials** for the live app are at `/workspaces/.tmp/secure/demo-credentials.md` (outside repo)
159
+
-**Staging authentication**: Use the smoke test token in `SAM_PLAYWRIGHT_PRIMARY_USER` env var. POST it to `https://api.sammy.party/api/auth/token-login` with body `{ "token": "<value>" }` to get a session cookie, then navigate to `https://app.sammy.party`. See `.claude/rules/13-staging-verification.md` for full procedure.
160
+
-**Production authentication**: Use GitHub OAuth credentials at `/workspaces/.tmp/secure/demo-credentials.md` (outside repo)
160
161
-**Live test cleanup required**: delete test workspaces/nodes after verification
161
162
-**Staging verification required for every code PR** — see `.claude/rules/13-staging-verification.md`
162
163
- See `.claude/rules/02-quality-gates.md` for full testing requirements
0 commit comments