|
| 1 | +# PR_26167_195-product-data-uses-database-url |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | +- PASS - Current branch is `main`. |
| 5 | +- PASS - `docs_build/dev/PROJECT_INSTRUCTIONS.md` was read before changes. |
| 6 | + |
| 7 | +## Requirement Checklist |
| 8 | +- PASS - Investigated the platform banner data path. |
| 9 | +- PASS - Root cause: `SupabasePostgresProviderAdapter.requestTable()` was using `GAMEFOUNDRY_SUPABASE_URL/rest/v1` with the service-role key for product-data table reads/writes. |
| 10 | +- PASS - Added a server-side direct PostgreSQL client that reads `GAMEFOUNDRY_DATABASE_URL`. |
| 11 | +- PASS - Updated the product-data adapter so table reads/writes use the configured database client, not Supabase REST. |
| 12 | +- PASS - `platform_settings` read/write now flows through `GAMEFOUNDRY_DATABASE_URL`. |
| 13 | +- PASS - Supabase URL/keys remain in the Auth adapter path only. |
| 14 | +- PASS - Runtime `.env` loading behavior was not changed. |
| 15 | +- PASS - No local-db/mock-db/SQLite fallback was added. |
| 16 | +- PASS - No DEV/UAT/PROD branching was added; environment-agnostic validation passed. |
| 17 | +- PASS - No secrets were printed in validation output or this report. |
| 18 | +- FAIL - Live local Postgres validation could not complete because nothing is listening on `127.0.0.1:5432`. |
| 19 | +- FAIL - Saving a platform banner and verifying local `platform_settings` update could not complete until local Postgres is running. |
| 20 | +- FAIL - Supabase-not-updated live evidence could not be completed through an actual banner save because the configured local database connection refused connections before any write. |
| 21 | + |
| 22 | +## Files Changed |
| 23 | +- `src/dev-runtime/auth/provider-contract-stubs.mjs` |
| 24 | +- `src/dev-runtime/persistence/postgres-connection-client.mjs` |
| 25 | +- `tests/dev-runtime/ProductDataDatabaseUrl.test.mjs` |
| 26 | +- `docs_build/dev/reports/environment_agnostic_browser_gate_report.md` |
| 27 | +- `docs_build/dev/reports/PR_26167_195-product-data-uses-database-url.md` |
| 28 | + |
| 29 | +## Local Postgres Evidence |
| 30 | +- PASS - `.env` contains `GAMEFOUNDRY_DATABASE_URL` pointing at host `127.0.0.1`, port `5432`, database `gamefoundry_dev`; username/password presence was verified without printing values. |
| 31 | +- FAIL - Direct configured database read of `platform_settings` returned `ECONNREFUSED 127.0.0.1:5432`. |
| 32 | +- FAIL - API-level `GET /api/platform-settings/banner` returned HTTP 500 with an `ECONNREFUSED` diagnostic from the configured database connection. |
| 33 | +- BLOCKED - `POST /api/admin/platform-settings/banner` was not run because the read path already proved the configured database is unavailable. |
| 34 | + |
| 35 | +## Supabase-Not-Updated Evidence |
| 36 | +- PASS - Static code evidence: `src/dev-runtime/auth/provider-contract-stubs.mjs` and `src/dev-runtime/persistence/postgres-connection-client.mjs` contain no `/rest/v1/` product-data path after the fix. |
| 37 | +- PASS - Focused unit evidence: `tests/dev-runtime/ProductDataDatabaseUrl.test.mjs` verifies `platform_settings` calls `postgresClient.requestTable()` for POST and GET. |
| 38 | +- BLOCKED - Live UAT before/after row comparison was not performed because this PR must not write product data through Supabase and the configured local database connection is unavailable. |
| 39 | + |
| 40 | +## Validation Notes |
| 41 | +- PASS - `node --check src/dev-runtime/persistence/postgres-connection-client.mjs` |
| 42 | +- PASS - `node --check src/dev-runtime/auth/provider-contract-stubs.mjs` |
| 43 | +- PASS - `node --check tests/dev-runtime/ProductDataDatabaseUrl.test.mjs` |
| 44 | +- PASS - `node --test tests/dev-runtime/ProductDataDatabaseUrl.test.mjs` |
| 45 | +- PASS - `npm run validate:browser-env-agnostic` |
| 46 | +- FAIL - Connection validation with `.env` local Postgres: `ECONNREFUSED 127.0.0.1:5432`. |
| 47 | +- FAIL - Platform banner save/read local Postgres validation: blocked by local Postgres connection refusal. |
| 48 | +- FAIL - Targeted platform banner live validation: blocked by local Postgres connection refusal. |
| 49 | +- FAIL - Targeted Game Workspace create live validation: blocked by local Postgres connection refusal. |
| 50 | +- SKIP - Full samples smoke was not run, per request. |
| 51 | + |
| 52 | +## Completion Status |
| 53 | +- BLOCKED - PR is not complete because required live validation cannot pass until local Postgres is running on `127.0.0.1:5432` with the `gamefoundry_dev` schema available. |
0 commit comments