|
| 1 | +# PR_26166_157-first-real-sign-in-validation |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | + |
| 5 | +- Current branch: main |
| 6 | +- Expected branch: main |
| 7 | +- Branch validation: PASS |
| 8 | + |
| 9 | +## Purpose |
| 10 | + |
| 11 | +Validate real Supabase Create Account, Sign In, Session, Role Resolution, Sign Out, and Password Reset flows without adding new infrastructure. |
| 12 | + |
| 13 | +## Requirement Checklist |
| 14 | + |
| 15 | +- PASS - Real Create Account path validated against configured DEV Supabase. |
| 16 | +- PASS - Real Sign In path validated against configured DEV Supabase. |
| 17 | +- PASS - Current Session path validated after sign in. |
| 18 | +- PASS - Role resolution validated; created account resolved with `user`. |
| 19 | +- PASS - Sign Out validated; session returned to unauthenticated. |
| 20 | +- PASS - Password Reset validated with production-safe message. |
| 21 | +- PASS - No new infrastructure was added for this validation PR. |
| 22 | +- PASS - Product data remained Local DB. |
| 23 | +- PASS - No full samples smoke was run. |
| 24 | + |
| 25 | +## Validation Lane Report |
| 26 | + |
| 27 | +- contract: PASS - `node --test tests/dev-runtime/SupabaseProviderContractStub.test.mjs` |
| 28 | +- runtime: PASS - live local API probe against configured DEV Supabase. |
| 29 | +- integration: PASS - `npm run validate:supabase-dev` |
| 30 | +- Playwright: PASS - targeted auth/session Playwright subset. |
| 31 | +- samples: SKIP - explicitly out of scope. |
| 32 | + |
| 33 | +## Changed Files |
| 34 | + |
| 35 | +- Dedicated runtime implementation: none for this validation PR. |
| 36 | +- Stack reports/artifacts: `docs_build/dev/reports/*` |
| 37 | +- Shared stack tests: `tests/playwright/tools/LoginSessionMode.spec.mjs` |
| 38 | + |
| 39 | +## Playwright V8 Coverage |
| 40 | + |
| 41 | +- Artifact: `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 42 | +- Status: WARN advisory for files not collected by current Chromium V8 coverage; targeted behavior validation passed. |
| 43 | + |
| 44 | +## Skipped Lanes |
| 45 | + |
| 46 | +- samples: SKIP - explicitly out of scope. |
| 47 | +- full workspace suite: SKIP - targeted auth/session validation was requested for this stack. |
| 48 | + |
| 49 | +## Live DEV Evidence |
| 50 | + |
| 51 | +Sanitized live UAT probe: |
| 52 | + |
| 53 | +```json |
| 54 | +{ |
| 55 | + "authStatus": { |
| 56 | + "status": 200, |
| 57 | + "configured": true, |
| 58 | + "ready": true, |
| 59 | + "identityTablesReady": true, |
| 60 | + "productDataProvider": "local-db" |
| 61 | + }, |
| 62 | + "createAccount": { |
| 63 | + "status": 200, |
| 64 | + "identityProvisioned": true, |
| 65 | + "roleSlugs": ["user"], |
| 66 | + "userKeyLooksLikeUlid": true |
| 67 | + }, |
| 68 | + "signIn": { |
| 69 | + "status": 200, |
| 70 | + "sessionResolved": true, |
| 71 | + "roleSlugs": ["user"] |
| 72 | + }, |
| 73 | + "signedInSession": { |
| 74 | + "status": 200, |
| 75 | + "authenticated": true, |
| 76 | + "roleSlugs": ["user"], |
| 77 | + "userKeyLooksLikeUlid": true |
| 78 | + }, |
| 79 | + "signOut": { |
| 80 | + "status": 200, |
| 81 | + "authenticated": false |
| 82 | + }, |
| 83 | + "signedOutSession": { |
| 84 | + "status": 200, |
| 85 | + "authenticated": false, |
| 86 | + "displayName": "Login" |
| 87 | + }, |
| 88 | + "passwordReset": { |
| 89 | + "status": 200, |
| 90 | + "action": "password-reset", |
| 91 | + "message": "If an account exists for that email, password reset instructions will be sent." |
| 92 | + } |
| 93 | +} |
| 94 | +``` |
| 95 | + |
| 96 | +## Manual Validation Notes |
| 97 | + |
| 98 | +1. Start the local API runtime with Supabase Auth env configured and `GAMEFOUNDRY_DB_PROVIDER=local-db`. |
| 99 | +2. Open `account/create-account.html` and create a new account. |
| 100 | +3. Open `account/sign-in.html`, sign in, and confirm the Account nav shows the signed-in user. |
| 101 | +4. Confirm `/api/session/current` returns authenticated with the `user` role. |
| 102 | +5. Use the Account logout action and confirm the session returns to signed out. |
| 103 | +6. Open `account/password-reset.html` and request a password reset. |
0 commit comments