|
| 1 | +# PR_26167_193-env-runtime-single-file-and-generic-db-url |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | +- PASS - Current branch is `main`. |
| 5 | +- PASS - `docs_build/dev/PROJECT_INSTRUCTIONS.md` was read before validation/reporting. |
| 6 | +- PASS - Source implementation is present in `HEAD` commit `24d9ae19148d89244872cd1e51d999e57f1f6348` (`Use single runtime env file and generic database URL - PR_26167_193-env-runtime-single-file-and-generic-db-url`). |
| 7 | + |
| 8 | +## Requirement Checklist |
| 9 | +- PASS - Runtime startup loads only `.env`; `scripts/start-local-api-server.mjs` uses `RUNTIME_ENV_FILE = ".env"`. |
| 10 | +- PASS - Runtime startup does not auto-load `.env.local` or `.env.uat`. |
| 11 | +- PASS - `.env.local` and `.env.uat` remain user-managed copy sources; `.env.local` was updated without printing values. |
| 12 | +- PASS - DEV validation explicitly loads `.env.local` only through `scripts/validate-supabase-dev.mjs`. |
| 13 | +- PASS - `GAMEFOUNDRY_AUTH_PROVIDER` and `GAMEFOUNDRY_DB_PROVIDER` are absent from active runtime startup/templates. |
| 14 | +- PASS - `GAMEFOUNDRY_SUPABASE_DATABASE_URL` was renamed to `GAMEFOUNDRY_DATABASE_URL` in active runtime, validation, template, and targeted test paths. |
| 15 | +- PASS - Auth-specific Supabase keys remain `GAMEFOUNDRY_SUPABASE_URL`, `GAMEFOUNDRY_SUPABASE_ANON_KEY`, and `GAMEFOUNDRY_SUPABASE_SERVICE_ROLE_KEY`. |
| 16 | +- PASS - `.env.local` has the required database key populated locally and provider-selection keys removed; values were not printed. |
| 17 | +- PASS - `.env.uat` contains the same four key names with placeholders and no provider-selection keys. |
| 18 | +- PASS - Validation wording reports Auth connection and Database connection readiness. |
| 19 | +- PASS - Browser/page validation found no deployment-label branching or provider/local-db fallback. |
| 20 | + |
| 21 | +## Env-File Loading Evidence |
| 22 | +- PASS - Runtime validation copied `.env.local` to `.env` only for the short-lived runtime check, then restored tracked `.env`. |
| 23 | +- PASS - Runtime startup output included `.env loaded for API runtime (4 key(s) applied).` |
| 24 | +- PASS - Runtime startup output included `Configured auth connection: configured.` |
| 25 | +- PASS - Runtime startup output included `Configured database connection: configured.` |
| 26 | +- PASS - Runtime startup output did not mention `.env.local`, `.env.uat`, provider selection, or provider env vars. |
| 27 | + |
| 28 | +## Rename Evidence |
| 29 | +- PASS - Active non-report scan found no `GAMEFOUNDRY_SUPABASE_DATABASE_URL`. |
| 30 | +- PASS - `.env`, `.env.example`, `.env.uat`, `scripts/start-local-api-server.mjs`, Supabase DEV validation, DDL apply script, provider contract stubs, and targeted tests use `GAMEFOUNDRY_DATABASE_URL`. |
| 31 | + |
| 32 | +## Provider Var Removal Evidence |
| 33 | +- PASS - `.env`, `.env.example`, and `.env.uat` contain no `GAMEFOUNDRY_AUTH_PROVIDER` or `GAMEFOUNDRY_DB_PROVIDER`. |
| 34 | +- PASS - `scripts/start-local-api-server.mjs` contains no provider-selection env dependency. |
| 35 | +- PASS - Runtime startup reports configured connections, not provider selection. |
| 36 | + |
| 37 | +## Validation Lane Report |
| 38 | +- PASS - `node --check scripts/apply-supabase-dev-ddl.mjs` |
| 39 | +- PASS - `node --check scripts/start-local-api-server.mjs` |
| 40 | +- PASS - `node --check scripts/validate-supabase-dev.mjs` |
| 41 | +- PASS - `node --check src/dev-runtime/auth/provider-contract-stubs.mjs` |
| 42 | +- PASS - `node --check tests/dev-runtime/SupabaseProviderContractStub.test.mjs` |
| 43 | +- PASS - `node --check tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs` |
| 44 | +- PASS - `npm run validate:supabase-dev` |
| 45 | + - PASS - Explicit `.env.local` DEV validation load. |
| 46 | + - PASS - Auth connection URL, anon key, service role key, and database connection URL configured with masked diagnostics. |
| 47 | + - PASS - Supabase Auth/REST identity tables reachable. |
| 48 | + - WARN - Direct PostgreSQL TLS reported `SELF_SIGNED_CERT_IN_CHAIN`; validator marked this advisory because REST/API identity readiness passed. |
| 49 | +- PASS - Manual `.env.uat` structural validation: required keys present and forbidden keys absent. |
| 50 | +- PASS - `npm run dev:local-api` runtime check on alternate port after temporary `.env.local` to `.env` copy. |
| 51 | +- PASS - `npx playwright test tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs --grep "Game Workspace creates|active-game API" --workers=1 --reporter=list` (2 passed). |
| 52 | +- PASS - `npm run validate:browser-env-agnostic` |
| 53 | +- SKIP - `npm run test:workspace-v2`; no shared runtime/session UI behavior changed beyond the targeted Game Workspace create/API validation lane. |
| 54 | +- SKIP - Full samples smoke, per instruction. |
| 55 | + |
| 56 | +## Manual Validation Notes |
| 57 | +- `.env.local` was updated locally without exposing values: old database key renamed to `GAMEFOUNDRY_DATABASE_URL`, provider-selection keys removed, and the four required connection keys retained. |
| 58 | +- `.env.uat` was validated structurally only; no UAT secrets were created or printed. |
| 59 | +- Runtime validation used `.env` as the only startup-loaded env file and restored the tracked placeholder `.env` immediately after the check. |
| 60 | +- Targeted Game Workspace validation confirmed create/open/delete behavior and active-game API diagnostics do not throw. |
| 61 | +- Browser environment validation confirmed active page code remains free of deployment-label branching, product-data fallback, and implementation wording leaks. |
0 commit comments