Skip to content

Commit ca49623

Browse files
committed
Delete SQLite Local DB runtime debt and use connection-only startup wording - PR_26167_184-delete-sqlite-local-db-runtime-debt
1 parent 47246ec commit ca49623

46 files changed

Lines changed: 117180 additions & 113077 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Game Foundry Studio local development environment
22

3-
# Supabase Auth and Supabase Postgres are the DEV auth/product data path.
4-
# Missing Supabase configuration reports diagnostics instead of falling back.
3+
# Configure the local API account and product-data connections here.
4+
# Missing connection configuration reports diagnostics instead of falling back.
55

6-
# Supabase DEV browser-safe configuration.
6+
# Browser-safe account connection configuration.
77
# Leave values empty in this example; local values belong in .env.local.
88
GAMEFOUNDRY_SUPABASE_URL=
99
GAMEFOUNDRY_SUPABASE_ANON_KEY=
1010

11-
# Supabase DEV server-only configuration.
11+
# Server-only product-data and account administration connection configuration.
1212
# Do not expose these values to browser JavaScript, HTML, reports, or screenshots.
1313
GAMEFOUNDRY_SUPABASE_SERVICE_ROLE_KEY=
1414
GAMEFOUNDRY_SUPABASE_DATABASE_URL=

docs_build/dev/codex_commands.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,3 +2072,48 @@ Required reports:
20722072

20732073
Packaging:
20742074
- `tmp/PR_26167_183-single-service-contract-validation_delta.zip`
2075+
2076+
2077+
## PR_26167_184-delete-sqlite-local-db-runtime-debt
2078+
2079+
Changes:
2080+
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
2081+
- Verified the current branch is `main`.
2082+
- Removed active SQLite/Local DB adapter code from `src/dev-runtime/server/local-api-router.mjs`.
2083+
- Replaced active `/api/local-db`, `/api/mock-db`, setup reseed, and mock-db-state mutations with visible deprecated endpoint responses.
2084+
- Added `/api/product-data/snapshot` for server product-data snapshots.
2085+
- Removed local API startup provider-selector env writes and switched startup output to configured connection wording.
2086+
- Removed provider selector env reads from the auth/provider contract snapshot.
2087+
- Updated `.env.example` to describe configured account/product-data connections.
2088+
- Updated browser-env validation, targeted API tests, and account Playwright setup for the single connection path.
2089+
2090+
Validation:
2091+
- `node --check scripts/start-local-api-server.mjs`
2092+
- `node --check src/dev-runtime/server/local-api-router.mjs`
2093+
- `node --check src/dev-runtime/auth/provider-contract-stubs.mjs`
2094+
- `node --check scripts/validate-browser-env-agnostic.mjs`
2095+
- `node --check tests/dev-runtime/SupabaseProductDataCutover.test.mjs`
2096+
- `node --check tests/dev-runtime/SupabaseProviderContractStub.test.mjs`
2097+
- `node --check tests/helpers/playwrightRepoServer.mjs`
2098+
- `node --check tests/playwright/account/SupabaseSignInSession.spec.mjs`
2099+
- `node --test tests/dev-runtime/SupabaseProductDataCutover.test.mjs`
2100+
- `node --test --test-name-pattern "provider contract does not require|Supabase stubs fail visibly|Fixed Supabase providers keep diagnostics|Missing Supabase config fails safely|selected path reads users|Unsupported provider selector" tests/dev-runtime/SupabaseProviderContractStub.test.mjs`
2101+
- Initial full-file `node --test tests/dev-runtime/SupabaseProviderContractStub.test.mjs` attempt timed out; the PR-impacted subset passed.
2102+
- `npm run validate:supabase-dev`
2103+
- `npm run dev:local-api` startup capture passed; output had connection status lines and no SQLite/provider-selection wording.
2104+
- `npm run validate:browser-env-agnostic`
2105+
- `npx playwright test tests/playwright/account/SupabaseSignInSession.spec.mjs --config=playwright.config.cjs`
2106+
- `npx playwright test tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs --config=playwright.config.cjs`
2107+
- `npm run test:workspace-v2` passed. Command name is legacy and user-facing language is Project Workspace.
2108+
- Full samples smoke skipped because samples were not in scope.
2109+
2110+
Required reports:
2111+
- `docs_build/dev/reports/PR_26167_184-delete-sqlite-local-db-runtime-debt.md`
2112+
- `docs_build/dev/reports/environment_agnostic_browser_gate_report.md`
2113+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
2114+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
2115+
- `docs_build/dev/reports/codex_changed_files.txt`
2116+
- `docs_build/dev/reports/codex_review.diff`
2117+
2118+
Packaging:
2119+
- `tmp/PR_26167_184-delete-sqlite-local-db-runtime-debt_delta.zip`

docs_build/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Validate single service contract paths - PR_26167_183-single-service-contract-validation
1+
Delete SQLite/Local DB runtime debt - PR_26167_184-delete-sqlite-local-db-runtime-debt
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# PR_26167_184-delete-sqlite-local-db-runtime-debt
2+
3+
## Summary
4+
5+
Removed active SQLite/Local DB runtime debt from the local API startup/router path. The local API no longer imports or opens `node:sqlite`, no longer sets or reads provider-selection environment variables, and now reports configured account/product-data connections at startup.
6+
7+
Legacy `/api/local-db`, `/api/mock-db`, `/api/admin/setup/reseed`, and `/api/dev/testing/mock-db-state` paths now fail visibly with `410` deprecated endpoint responses. Product data snapshots use `/api/product-data/snapshot`.
8+
9+
## Branch Validation
10+
11+
PASS
12+
13+
- Current branch: `main`
14+
- Expected branch: `main`
15+
- `docs_build/dev/PROJECT_INSTRUCTIONS.md` was read before execution.
16+
17+
## Requirement Checklist
18+
19+
- PASS - Removed active SQLite runtime code from `src/dev-runtime/server/local-api-router.mjs`; no `node:sqlite`, `DatabaseSync`, `createRequire`, or `LocalDbAdapter` remains there.
20+
- PASS - `/api/local-db` and `/api/mock-db` no longer serve active data routes; they return visible `410` deprecated endpoint responses.
21+
- PASS - `/api/admin/setup/reseed` and `/api/dev/testing/mock-db-state` no longer mutate Local DB/mock DB state; they return visible `410` deprecated endpoint responses.
22+
- PASS - Product data snapshot access moved to `/api/product-data/snapshot`.
23+
- PASS - `scripts/start-local-api-server.mjs` no longer sets `GAMEFOUNDRY_AUTH_PROVIDER` or `GAMEFOUNDRY_DB_PROVIDER`.
24+
- PASS - Runtime contract creation no longer reads provider selector environment variables.
25+
- PASS - Startup output uses account/product-data connection wording.
26+
- PASS - `.env.example` describes configured connections, not DEV providers.
27+
- PASS - Account browser/page scan found no DEV/UAT/PROD/Local/SQLite/Supabase/provider implementation wording in affected account files.
28+
- PASS - No silent fallback was added; missing configuration and deprecated endpoints fail visibly.
29+
- PASS - No UAT/PROD resources were touched.
30+
- PASS - No secrets or `.env.local` content were committed.
31+
32+
## Validation Lane Report
33+
34+
- PASS - `node --check scripts/start-local-api-server.mjs`
35+
- PASS - `node --check src/dev-runtime/server/local-api-router.mjs`
36+
- PASS - `node --check src/dev-runtime/auth/provider-contract-stubs.mjs`
37+
- PASS - `node --check scripts/validate-browser-env-agnostic.mjs`
38+
- PASS - `node --check tests/dev-runtime/SupabaseProductDataCutover.test.mjs`
39+
- PASS - `node --check tests/dev-runtime/SupabaseProviderContractStub.test.mjs`
40+
- PASS - `node --check tests/helpers/playwrightRepoServer.mjs`
41+
- PASS - `node --check tests/playwright/account/SupabaseSignInSession.spec.mjs`
42+
- PASS - `node --test tests/dev-runtime/SupabaseProductDataCutover.test.mjs`
43+
- PASS - `node --test --test-name-pattern "provider contract does not require|Supabase stubs fail visibly|Fixed Supabase providers keep diagnostics|Missing Supabase config fails safely|selected path reads users|Unsupported provider selector" tests/dev-runtime/SupabaseProviderContractStub.test.mjs`
44+
- WARN - Initial full-file `node --test tests/dev-runtime/SupabaseProviderContractStub.test.mjs` attempt timed out; reran the PR-impacted auth/API subset above and it passed.
45+
- PASS - `npm run validate:supabase-dev`; direct PostgreSQL TLS remains an advisory DEV warning while REST/API identity checks passed.
46+
- PASS - `npm run dev:local-api` startup capture confirmed no SQLite warning, no Local DB provider selection, no selector env output, and connection status lines were present.
47+
- PASS - `npm run validate:browser-env-agnostic`
48+
- PASS - `npx playwright test tests/playwright/account/SupabaseSignInSession.spec.mjs --config=playwright.config.cjs`
49+
- PASS - `npx playwright test tests/playwright/tools/StaticOnlyLoginApiRequired.spec.mjs --config=playwright.config.cjs`
50+
- PASS - `npm run test:workspace-v2` passed, 5 tests. Command name is legacy; user-facing language is Project Workspace.
51+
- SKIP - Full samples smoke was not run because samples were not in scope.
52+
53+
## Manual Validation Notes
54+
55+
- Confirmed `npm run dev:local-api` printed only connection status:
56+
- `Local API account connection: configured.`
57+
- `Local API product data connection: configured.`
58+
- Confirmed startup output did not contain `SQLite`, `GAMEFOUNDRY_AUTH_PROVIDER`, `GAMEFOUNDRY_DB_PROVIDER`, `auth provider`, or `product data provider`.
59+
- Confirmed static route audit found no selector env variables or SQLite startup/opening symbols in the local API router, startup script, auth contract stub, or `.env.example`.
60+
- Confirmed `/api/local-db` and `/api/mock-db` are present only as deprecated endpoint guards returning `410`.
61+
62+
## Test Data Cleanup
63+
64+
No persistent Supabase validation records were created for this PR. Playwright auth validation used an in-memory fake Supabase server and closed it after validation.
65+
66+
## Playwright V8 Coverage
67+
68+
Generated `docs_build/dev/reports/playwright_v8_coverage_report.txt` and `docs_build/dev/reports/coverage_changed_js_guardrail.txt`.
69+
70+
- WARN - Changed server-side runtime JS files are not collected by browser V8 coverage; advisory only.
71+
- WARN - Coverage guardrail lists missing changed runtime JS coverage as advisory WARN, not FAIL.

docs_build/dev/reports/codex_changed_files.txt

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -42,65 +42,57 @@ M .env.example
4242
M src/dev-runtime/server/local-api-router.mjs
4343
M tests/dev-runtime/SupabaseProductDataCutover.test.mjs
4444
M tests/dev-runtime/SupabaseProviderContractStub.test.mjs
45-
M tests/playwright/tools/RootToolsFutureState.spec.mjs
46-
M toolbox/ai-assistant/index.html
47-
M toolbox/assets/assets.js
48-
?? docs_build/dev/reports/PR_26167_180-remove-sqlite-runtime-provider.md
49-
?? docs_build/dev/reports/PR_26167_181-supabase-postgres-single-product-data-path.md
50-
?? docs_build/dev/reports/PR_26167_182-remove-provider-selection-runtime.md
51-
?? docs_build/dev/reports/PR_26167_183-single-service-contract-validation.md
45+
M tests/helpers/playwrightRepoServer.mjs
46+
M tests/playwright/account/SupabaseSignInSession.spec.mjs
47+
?? docs_build/dev/reports/PR_26167_184-delete-sqlite-local-db-runtime-debt.md
5248

5349
# git ls-files --others --exclude-standard
54-
docs_build/dev/reports/PR_26167_180-remove-sqlite-runtime-provider.md
55-
docs_build/dev/reports/PR_26167_181-supabase-postgres-single-product-data-path.md
56-
docs_build/dev/reports/PR_26167_182-remove-provider-selection-runtime.md
57-
docs_build/dev/reports/PR_26167_183-single-service-contract-validation.md
50+
docs_build/dev/reports/PR_26167_184-delete-sqlite-local-db-runtime-debt.md
5851

5952
# git diff --stat
60-
.env.example | 6 +-
61-
docs_build/dev/codex_commands.md | 143 +
53+
.env.example | 8 +-
54+
docs_build/dev/codex_commands.md | 45 +
6255
docs_build/dev/commit_comment.txt | 2 +-
63-
docs_build/dev/reports/codex_changed_files.txt | 110 +-
64-
docs_build/dev/reports/codex_review.diff | 109426 ++++++++++++++----
65-
.../dev/reports/coverage_changed_js_guardrail.txt | 16 +-
56+
docs_build/dev/reports/codex_changed_files.txt | 108 +-
57+
docs_build/dev/reports/codex_review.diff | 114544 +-----------------
58+
.../dev/reports/coverage_changed_js_guardrail.txt | 4 -
6659
docs_build/dev/reports/dependency_gating_report.md | 2 +-
67-
.../reports/dependency_hydration_reuse_report.md | 4 +-
68-
.../environment_agnostic_browser_gate_report.md | 22 +-
69-
.../dev/reports/execution_graph_reuse_report.md | 4 +-
60+
.../reports/dependency_hydration_reuse_report.md | 12 +-
61+
.../environment_agnostic_browser_gate_report.md | 1 -
62+
.../dev/reports/execution_graph_reuse_report.md | 16 +-
7063
.../dev/reports/failure_fingerprint_report.md | 2 +-
7164
.../reports/filesystem_scan_reduction_report.md | 2 +-
72-
.../dev/reports/incremental_validation_report.md | 2 +-
65+
.../dev/reports/incremental_validation_report.md | 14 +-
7366
docs_build/dev/reports/lane_compilation_report.md | 2 +-
7467
.../dev/reports/lane_deduplication_report.md | 2 +-
7568
.../dev/reports/lane_input_validation_report.md | 2 +-
7669
.../reports/lane_manifests/workspace-contract.json | 12 +-
77-
.../reports/lane_runtime_optimization_report.md | 2 +-
78-
docs_build/dev/reports/lane_snapshot_report.md | 4 +-
79-
.../reports/lane_snapshots/workspace-contract.json | 24 +-
80-
docs_build/dev/reports/lane_warm_start_report.md | 4 +-
81-
.../lane_warm_starts/workspace-contract.json | 16 +-
70+
.../reports/lane_runtime_optimization_report.md | 14 +-
71+
docs_build/dev/reports/lane_snapshot_report.md | 12 +-
72+
.../reports/lane_snapshots/workspace-contract.json | 30 +-
73+
docs_build/dev/reports/lane_warm_start_report.md | 12 +-
74+
.../lane_warm_starts/workspace-contract.json | 20 +-
8275
.../dev/reports/monolith_trigger_removal_report.md | 2 +-
83-
.../dev/reports/persistent_lane_manifest_report.md | 6 +-
76+
.../dev/reports/persistent_lane_manifest_report.md | 12 +-
8477
.../playwright_discovery_ownership_report.md | 2 +-
8578
.../reports/playwright_discovery_scope_report.md | 2 +-
8679
.../dev/reports/playwright_structure_audit.md | 2 +-
87-
.../dev/reports/playwright_v8_coverage_report.txt | 68 +-
80+
.../dev/reports/playwright_v8_coverage_report.txt | 9 +-
8881
docs_build/dev/reports/retry_suppression_report.md | 2 +-
89-
docs_build/dev/reports/slow_path_pruning_report.md | 14 +-
90-
docs_build/dev/reports/static_validation_report.md | 4 +-
91-
.../dev/reports/targeted_file_manifest_report.md | 4 +-
92-
.../dev/reports/test_cleanup_performance_report.md | 16 +-
82+
docs_build/dev/reports/slow_path_pruning_report.md | 18 +-
83+
docs_build/dev/reports/static_validation_report.md | 12 +-
84+
.../dev/reports/targeted_file_manifest_report.md | 8 +-
85+
.../dev/reports/test_cleanup_performance_report.md | 24 +-
9386
.../dev/reports/test_cleanup_routing_report.md | 2 +-
94-
.../dev/reports/testing_lane_execution_report.md | 18 +-
87+
.../dev/reports/testing_lane_execution_report.md | 54 +-
9588
docs_build/dev/reports/validation_cache_report.md | 30 +-
96-
.../dev/reports/zero_browser_preflight_report.md | 2 +-
97-
scripts/start-local-api-server.mjs | 31 +-
98-
scripts/validate-browser-env-agnostic.mjs | 249 +-
99-
src/dev-runtime/auth/provider-contract-stubs.mjs | 255 +-
100-
src/dev-runtime/server/local-api-router.mjs | 466 +-
101-
.../SupabaseProductDataCutover.test.mjs | 21 +
102-
.../SupabaseProviderContractStub.test.mjs | 269 +-
103-
.../playwright/tools/RootToolsFutureState.spec.mjs | 170 +-
104-
toolbox/ai-assistant/index.html | 8 +-
105-
toolbox/assets/assets.js | 2 +-
106-
46 files changed, 85328 insertions(+), 26126 deletions(-)
89+
.../dev/reports/zero_browser_preflight_report.md | 10 +-
90+
scripts/start-local-api-server.mjs | 42 +-
91+
scripts/validate-browser-env-agnostic.mjs | 11 +-
92+
src/dev-runtime/auth/provider-contract-stubs.mjs | 45 +-
93+
src/dev-runtime/server/local-api-router.mjs | 494 +-
94+
.../SupabaseProductDataCutover.test.mjs | 29 +-
95+
.../SupabaseProviderContractStub.test.mjs | 95 +-
96+
tests/helpers/playwrightRepoServer.mjs | 37 -
97+
.../account/SupabaseSignInSession.spec.mjs | 4 -
98+
45 files changed, 2180 insertions(+), 113632 deletions(-)

0 commit comments

Comments
 (0)