Skip to content

Commit 9081ebb

Browse files
committed
Remove provider env vars and fix Game Workspace create flow - PR_26167_192-env-config-and-game-workspace-create-fix
1 parent 58ab386 commit 9081ebb

9 files changed

Lines changed: 952 additions & 6201 deletions

File tree

.env.uat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Game Foundry Studio UAT connection environment
2+
3+
# Populate reviewed UAT connection values outside commits before starting UAT.
4+
# Do not paste secrets into reports, screenshots, browser code, or PR notes.
5+
6+
GAMEFOUNDRY_SUPABASE_URL=
7+
GAMEFOUNDRY_SUPABASE_ANON_KEY=
8+
GAMEFOUNDRY_SUPABASE_SERVICE_ROLE_KEY=
9+
GAMEFOUNDRY_SUPABASE_DATABASE_URL=
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# PR_26167_192-env-config-and-game-workspace-create-fix
2+
3+
## Branch Validation
4+
5+
- PASS - Current branch is `main`.
6+
- PASS - Worktree was clean before PR_26167_192 edits began.
7+
8+
## Requirement Checklist
9+
10+
- PASS - Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before changes.
11+
- PASS - Hard stop guard passed on `main`.
12+
- PASS - Active env examples/templates and runtime paths do not depend on `GAMEFOUNDRY_AUTH_PROVIDER` or `GAMEFOUNDRY_DB_PROVIDER`.
13+
- PASS - Account and product-data runtime remains fixed to configured Supabase Auth/Postgres connections.
14+
- PASS - Added `.env.uat` with the same four connection keys as `.env.local` structure and no populated values.
15+
- PASS - Reports do not include secret values.
16+
- PASS - Fixed Game Workspace `currentGameUserKey` so missing or malformed active-game payloads do not throw.
17+
- PASS - Repository read methods such as `getActiveGame` no longer trigger product-data persistence writes.
18+
- PASS - Server repository methods now reject undefined, error-shaped, or malformed `getActiveGame` results with visible API errors instead of malformed success payloads.
19+
- PASS - Game Workspace Create Game handles API and malformed result diagnostics visibly.
20+
- PASS - No silent fallback, browser-owned product data, or runtime DEV/UAT/PROD behavior branching was added.
21+
22+
## Provider Env Removal Evidence
23+
24+
- PASS - `.env.example` contains only Supabase connection keys and no provider selector variables.
25+
- PASS - `.env.uat` contains only Supabase connection keys and no provider selector variables.
26+
- PASS - `scripts/start-local-api-server.mjs` startup output uses configured account/product-data connection wording.
27+
- PASS - `src/dev-runtime/server/local-api-router.mjs` and `src/dev-runtime/auth/provider-contract-stubs.mjs` do not require provider selector environment variables.
28+
- PASS - Targeted scan returned no `GAMEFOUNDRY_AUTH_PROVIDER` or `GAMEFOUNDRY_DB_PROVIDER` matches in active PR files.
29+
30+
## .env.uat Evidence
31+
32+
- PASS - `.env.uat` exists.
33+
- PASS - Keys present: `GAMEFOUNDRY_SUPABASE_URL`, `GAMEFOUNDRY_SUPABASE_ANON_KEY`, `GAMEFOUNDRY_SUPABASE_SERVICE_ROLE_KEY`, `GAMEFOUNDRY_SUPABASE_DATABASE_URL`.
34+
- PASS - Structural validation found 4 expected keys, 0 missing keys, 0 extra keys, and 0 populated values.
35+
36+
## Game Workspace Fix Evidence
37+
38+
- PASS - `repositoryMethodRequiresPersistence()` skips read-only repository methods prefixed with `get`, `list`, or `read`, preventing `getActiveGame` from forcing a product-data write.
39+
- PASS - `assertRepositoryMethodResult()` fails visibly when repository methods return no result, error-shaped data, or malformed `getActiveGame` payloads.
40+
- PASS - `currentGameUserKey()` now reads active-game members through an array guard.
41+
- PASS - Game Workspace render/create paths normalize API diagnostics and malformed responses into visible status messages.
42+
- PASS - Targeted Playwright validated Create Game create/open/delete behavior.
43+
- PASS - Targeted Playwright validated forced `getActiveGame` API 502 renders a visible diagnostic and does not throw a page exception.
44+
45+
## Validation Lane Report
46+
47+
- PASS - `node --check src/dev-runtime/server/local-api-router.mjs`
48+
- PASS - `node --check toolbox/game-workspace/game-workspace.js`
49+
- PASS - `node --check tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs`
50+
- PASS - `npm run validate:supabase-dev`
51+
- Overall PASS.
52+
- Existing direct PostgreSQL TLS advisory remained WARN while REST/API identity readiness passed.
53+
- PASS - Manual `.env.uat` structural validation command.
54+
- PASS - `npm run dev:local-api` on alternate port `5512`.
55+
- Port `5501` was already in use on first attempt.
56+
- Successful startup used configured connection wording and no provider selector variables.
57+
- PASS - Targeted Game Workspace create/API validation:
58+
- `npx playwright test tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list -g "Game Workspace creates|active-game API"`
59+
- Result: 2 passed.
60+
- PASS - `npm run validate:browser-env-agnostic`
61+
- WARN - Broader initial Game Workspace spec run was wider than required and returned 7 passed / 2 failed.
62+
- One failure was the new diagnostic test expecting no console 502 message; fixed before targeted rerun.
63+
- One failure was an older Toolbox role-count assertion outside this PR's create/API scope.
64+
- SKIP - `npm run test:workspace-v2` was not run because PR_26167_192 did not change Project Workspace/session/toolState UI behavior; the changed API behavior was covered by targeted Game Workspace API/browser validation. The command name remains legacy and the user-facing language is Project Workspace.
65+
- SKIP - Full samples smoke was not run per request.
66+
67+
## Playwright V8 Coverage
68+
69+
- PASS - `docs_build/dev/reports/playwright_v8_coverage_report.txt` generated.
70+
- PASS - `toolbox/game-workspace/game-workspace.js` collected browser V8 coverage.
71+
- WARN - `src/dev-runtime/server/local-api-router.mjs` is server runtime and was not collected by browser V8 coverage; advisory only.
72+
73+
## Manual Validation Notes
74+
75+
- Manual interactive browser validation was not run against live DEV data.
76+
- Automated browser validation opened `/toolbox/game-workspace/index.html`, created/opened/deleted a game through the server API contract, and validated the visible active-game API diagnostic path.
77+
- Local API startup was verified through `npm run dev:local-api` on port `5512`; the process was stopped after startup output was captured.
78+
- `.env.uat` was validated structurally without populating or reporting secrets.
79+
80+
## Files Changed
81+
82+
- `.env.uat`
83+
- `src/dev-runtime/server/local-api-router.mjs`
84+
- `toolbox/game-workspace/game-workspace.js`
85+
- `tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs`
86+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
87+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
Lines changed: 13 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,20 @@
11
# git status --short
2-
M admin/platform-settings.html
3-
M admin/site-settings.html
4-
M admin/tool-votes.html
5-
M admin/users.html
6-
M assets/theme-v2/js/admin-platform-settings.js
7-
M assets/theme-v2/js/admin-service-page-data.js
8-
M assets/theme-v2/js/gamefoundry-partials.js
9-
M docs_build/database/dml/admin.sql
10-
M docs_build/database/seed/account.json
11-
M docs_build/database/seed/admin.json
12-
M docs_build/dev/reports/codex_changed_files.txt
13-
M docs_build/dev/reports/codex_review.diff
14-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
15-
M docs_build/dev/reports/dependency_gating_report.md
16-
M docs_build/dev/reports/dependency_hydration_reuse_report.md
17-
M docs_build/dev/reports/environment_agnostic_browser_gate_report.md
18-
M docs_build/dev/reports/execution_graph_reuse_report.md
19-
M docs_build/dev/reports/failure_fingerprint_report.md
20-
M docs_build/dev/reports/filesystem_scan_reduction_report.md
21-
M docs_build/dev/reports/incremental_validation_report.md
22-
M docs_build/dev/reports/lane_compilation_report.md
23-
M docs_build/dev/reports/lane_deduplication_report.md
24-
M docs_build/dev/reports/lane_input_validation_report.md
25-
M docs_build/dev/reports/lane_manifests/workspace-contract.json
26-
M docs_build/dev/reports/lane_runtime_optimization_report.md
27-
M docs_build/dev/reports/lane_snapshot_report.md
28-
M docs_build/dev/reports/lane_snapshots/workspace-contract.json
29-
M docs_build/dev/reports/lane_warm_start_report.md
30-
M docs_build/dev/reports/lane_warm_starts/workspace-contract.json
31-
M docs_build/dev/reports/monolith_trigger_removal_report.md
32-
M docs_build/dev/reports/persistent_lane_manifest_report.md
33-
M docs_build/dev/reports/playwright_discovery_ownership_report.md
34-
M docs_build/dev/reports/playwright_discovery_scope_report.md
35-
M docs_build/dev/reports/playwright_structure_audit.md
2+
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
363
M docs_build/dev/reports/playwright_v8_coverage_report.txt
37-
M docs_build/dev/reports/retry_suppression_report.md
38-
M docs_build/dev/reports/slow_path_pruning_report.md
39-
M docs_build/dev/reports/static_validation_report.md
40-
M docs_build/dev/reports/targeted_file_manifest_report.md
41-
M docs_build/dev/reports/test_cleanup_performance_report.md
42-
M docs_build/dev/reports/test_cleanup_routing_report.md
43-
M docs_build/dev/reports/testing_lane_execution_report.md
44-
M docs_build/dev/reports/validation_cache_report.md
45-
M docs_build/dev/reports/zero_browser_preflight_report.md
46-
M scripts/sync-supabase-dev-creator-identities.mjs
47-
M src/dev-runtime/auth/provider-contract-stubs.mjs
48-
M src/dev-runtime/persistence/mock-db-store.js
49-
M src/dev-runtime/seed/seed-db-keys.mjs
50-
M src/dev-runtime/seed/server-seed-loader.mjs
514
M src/dev-runtime/server/local-api-router.mjs
52-
M src/dev-runtime/testing/supabase-dev-creator-identity-seed-sync.mjs
53-
M tests/dev-runtime/SupabaseDevCreatorIdentitySeedSync.test.mjs
54-
M tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs
55-
?? assets/theme-v2/js/owner-operations.js
56-
?? docs_build/dev/reports/PR_26167_191-owner-operations-settings-and-role-cleanup.md
57-
?? owner/
58-
?? src/engine/api/owner-operations-api-client.js
5+
M tests/playwright/tools/GameWorkspaceMockRepository.spec.mjs
6+
M toolbox/game-workspace/game-workspace.js
7+
?? .env.uat
8+
?? docs_build/dev/reports/PR_26167_192-env-config-and-game-workspace-create-fix.md
599

6010
# git ls-files --others --exclude-standard
61-
assets/theme-v2/js/owner-operations.js
62-
docs_build/dev/reports/PR_26167_191-owner-operations-settings-and-role-cleanup.md
63-
owner/operations.html
64-
src/engine/api/owner-operations-api-client.js
11+
.env.uat
12+
docs_build/dev/reports/PR_26167_192-env-config-and-game-workspace-create-fix.md
6513

6614
# git diff --stat
67-
admin/platform-settings.html | 11 +-
68-
admin/site-settings.html | 4 -
69-
admin/tool-votes.html | 4 +-
70-
admin/users.html | 6 +-
71-
assets/theme-v2/js/admin-platform-settings.js | 22 +-
72-
assets/theme-v2/js/admin-service-page-data.js | 4 +-
73-
assets/theme-v2/js/gamefoundry-partials.js | 34 +-
74-
docs_build/database/dml/admin.sql | 8 +-
75-
docs_build/database/seed/account.json | 3 +-
76-
docs_build/database/seed/admin.json | 12 +-
77-
docs_build/dev/reports/codex_changed_files.txt | 124 +-
78-
docs_build/dev/reports/codex_review.diff | 3059 ++++++++++++++++----
79-
.../dev/reports/coverage_changed_js_guardrail.txt | 9 +-
80-
docs_build/dev/reports/dependency_gating_report.md | 2 +-
81-
.../reports/dependency_hydration_reuse_report.md | 4 +-
82-
.../environment_agnostic_browser_gate_report.md | 2 +-
83-
.../dev/reports/execution_graph_reuse_report.md | 4 +-
84-
.../dev/reports/failure_fingerprint_report.md | 2 +-
85-
.../reports/filesystem_scan_reduction_report.md | 2 +-
86-
.../dev/reports/incremental_validation_report.md | 2 +-
87-
docs_build/dev/reports/lane_compilation_report.md | 2 +-
88-
.../dev/reports/lane_deduplication_report.md | 2 +-
89-
.../dev/reports/lane_input_validation_report.md | 2 +-
90-
.../reports/lane_manifests/workspace-contract.json | 12 +-
91-
.../reports/lane_runtime_optimization_report.md | 2 +-
92-
docs_build/dev/reports/lane_snapshot_report.md | 4 +-
93-
.../reports/lane_snapshots/workspace-contract.json | 26 +-
94-
docs_build/dev/reports/lane_warm_start_report.md | 4 +-
95-
.../lane_warm_starts/workspace-contract.json | 18 +-
96-
.../dev/reports/monolith_trigger_removal_report.md | 2 +-
97-
.../dev/reports/persistent_lane_manifest_report.md | 6 +-
98-
.../playwright_discovery_ownership_report.md | 2 +-
99-
.../reports/playwright_discovery_scope_report.md | 2 +-
100-
.../dev/reports/playwright_structure_audit.md | 2 +-
101-
.../dev/reports/playwright_v8_coverage_report.txt | 35 +-
102-
docs_build/dev/reports/retry_suppression_report.md | 2 +-
103-
docs_build/dev/reports/slow_path_pruning_report.md | 8 +-
104-
docs_build/dev/reports/static_validation_report.md | 4 +-
105-
.../dev/reports/targeted_file_manifest_report.md | 4 +-
106-
.../dev/reports/test_cleanup_performance_report.md | 10 +-
107-
.../dev/reports/test_cleanup_routing_report.md | 2 +-
108-
.../dev/reports/testing_lane_execution_report.md | 12 +-
109-
docs_build/dev/reports/validation_cache_report.md | 30 +-
110-
.../dev/reports/zero_browser_preflight_report.md | 2 +-
111-
scripts/sync-supabase-dev-creator-identities.mjs | 7 +-
112-
src/dev-runtime/auth/provider-contract-stubs.mjs | 30 +-
113-
src/dev-runtime/persistence/mock-db-store.js | 27 -
114-
src/dev-runtime/seed/seed-db-keys.mjs | 1 -
115-
src/dev-runtime/seed/server-seed-loader.mjs | 27 -
116-
src/dev-runtime/server/local-api-router.mjs | 192 +-
117-
.../supabase-dev-creator-identity-seed-sync.mjs | 89 +-
118-
.../SupabaseDevCreatorIdentitySeedSync.test.mjs | 4 +-
119-
.../tools/AdminPlatformToolsWireframes.spec.mjs | 272 +-
120-
53 files changed, 3216 insertions(+), 946 deletions(-)
15+
.../dev/reports/coverage_changed_js_guardrail.txt | 15 ++-
16+
.../dev/reports/playwright_v8_coverage_report.txt | 52 ++++----
17+
src/dev-runtime/server/local-api-router.mjs | 31 ++++-
18+
.../tools/GameWorkspaceMockRepository.spec.mjs | 133 +++++++++++++++++++++
19+
toolbox/game-workspace/game-workspace.js | 115 +++++++++++++++---
20+
5 files changed, 299 insertions(+), 47 deletions(-)

0 commit comments

Comments
 (0)