You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Browser files import static `toolRegistry.js` directly. | PASS | `rg -n 'import .*toolRegistry\\.js|from .*toolRegistry\\.js|import\\(.*toolRegistry\\.js' ...` returned no matches. |
23
19
24
-
## Local Mode Cleanup
20
+
## Local DB Boundary
25
21
26
22
| Check | Status | Evidence |
27
23
| --- | --- | --- |
28
-
| Local login shows only Local Mem and Local DB. | PASS | Login Playwright lane asserts exact labels. |
29
-
| DEV/UAT/Prod are not local login buttons. | PASS | Login Playwright lane asserts no DEV, UAT, or Prod buttons. |
30
-
| Server rejects legacy `modeId: "local"`. | PASS | API contract probe returned 500 with `Unknown local login environment: local`. |
31
-
| Local DB does not fall back to Local Mem. | PASS | API contract probe verified Local DB snapshot fails with `Local DB adapter not configured`. |
32
-
| DB Viewer user-facing wording says Local Mem DB. | PASS | Admin DB Viewer Playwright asserts Local Mem DB headings, status text, clear/seed controls, and dialogs. |
24
+
| Browser flow remains Browser -> API client -> server API -> data source. | PASS | Local DB implementation lives in `src/dev-runtime/server/mock-api-router.mjs`; login and DB Viewer continue to use `/api/session/*` and `/api/mock-db/*`. |
25
+
| Browser code does not import Local DB implementation modules. | PASS | No browser import-boundary matches were found. |
26
+
| Local Mem behavior remains available. | PASS | LoginSessionMode and AdminDbViewer Playwright lanes passed against Local Mem. |
27
+
| Local DB is configured behind the existing server API boundary. | PASS | API contract probe selected `local-db`, resolved users/roles, read snapshots, and verified persisted clear across server restart. |
28
+
| Local DB failure is visible and actionable. | PASS | API contract probe with `GAMEFOUNDRY_LOCAL_DB_DISABLE=1` returned a 500 diagnostic naming `Local DB adapter not configured` and the disabled storage cause. |
29
+
| UAT/Prod are not local login choices. | PASS | LoginSessionMode Playwright and API contract probe assert only Local Mem and Local DB selector modes. |
33
30
34
31
## Remaining Internal Matches
35
32
36
33
-`toolbox/*/*-mock-repository.js` and `toolbox/colors/palette-workspace-repository.js` remain server/data-source implementation modules, not active browser entry imports.
37
34
-`/api/mock-db/*` route names and `mock-db-*` module filenames remain stable internal API contracts.
38
-
- Internal exception text `Invalid mock DB audit user key` remains in non-user-facing audit validation.
Copy file name to clipboardExpand all lines: docs_build/dev/reports/coverage_changed_js_guardrail.txt
-21Lines changed: 0 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -8,41 +8,20 @@ Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
8
8
Changed runtime JS files considered:
9
9
(0%) src/dev-runtime/persistence/mock-db-store.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10
10
(0%) src/dev-runtime/server/mock-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
11
-
(0%) src/engine/api/session-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
12
11
(0%) src/shared/toolbox/assetUsageIntegration.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
13
12
(0%) src/shared/toolbox/platformShell.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
14
13
(0%) src/shared/toolbox/projectSystem.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
15
14
(0%) src/shared/toolbox/toolHostManifest.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
16
15
(0%) src/shared/toolbox/toolLaunchSSoTData.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
17
-
(0%) toolbox/assets/assets-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
18
-
(0%) toolbox/assets/assets-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
19
-
(0%) toolbox/colors/palette-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
20
-
(0%) toolbox/colors/palette-workspace-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21
-
(0%) toolbox/game-configuration/game-configuration-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
22
-
(0%) toolbox/game-design/game-design-api-client.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
23
-
(0%) toolbox/project-journey/project-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
Implemented the next smallest Local DB server adapter step behind the existing server API boundary. Local Mem remains unchanged, Local DB now uses a server-side JSON-backed `LocalDbAdapter`, and browser code continues to interact through the existing API routes.
6
+
7
+
## Requirement Checklist
8
+
9
+
| Requirement | Status | Evidence |
10
+
| --- | --- | --- |
11
+
| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | PASS | Instructions were read before implementation. |
12
+
| Implement/configure Local DB behind existing server API boundary. | PASS |`src/dev-runtime/server/mock-api-router.mjs` adds `LocalDbAdapter`, dynamic local DB storage path resolution, read/write state, and adapter persistence. |
13
+
| Keep Browser -> API client -> server API -> Local DB data source. | PASS | Browser-facing behavior still uses `/api/session/*`, `/api/mock-db/*`, and server API routes; static import audit found no browser direct Local DB imports. |
14
+
| Do not let browser code import dev-runtime, DB repositories, or DB implementation modules directly. | PASS | Static import boundary checks returned no browser import matches. |
15
+
| Preserve Local Mem behavior. | PASS | LoginSessionMode, AdminDbViewer, and ProjectJourneyTool Playwright lanes passed with existing Local Mem flows. |
16
+
| Local DB fails visibly with actionable diagnostics when storage cannot initialize. | PASS | API probe with `GAMEFOUNDRY_LOCAL_DB_DISABLE=1` returned `Local DB adapter not configured` plus the disabled storage cause. |
17
+
| Do not expose UAT or Prod as local login choices. | PASS | Login UI and API probe assert local login choices are exactly `Local Mem` and `Local DB`. |
18
+
| Do not modify `start_of_day` folders. | PASS | No `start_of_day` files changed. |
19
+
20
+
## Implementation Notes
21
+
22
+
| Area | Evidence |
23
+
| --- | --- |
24
+
| Local DB adapter |`src/dev-runtime/server/mock-api-router.mjs` adds `LocalDbAdapter` with JSON read/write storage, `GAMEFOUNDRY_LOCAL_DB_PATH` override, default `tmp/local-db/local-db-state.json`, and disabled-storage diagnostic support. |
25
+
| Adapter contract |`src/dev-runtime/server/mock-api-router.mjs` reports Local DB as `configured`; `src/dev-runtime/persistence/mock-db-store.js` marks Local DB as configured, persistent, and users-enabled. |
26
+
| State persistence |`LocalDevMockDataSource` now snapshots, applies, and persists state on mode switches, clear/seed/testing-state replacement, and repository method writes. |
27
+
| Login validation |`tests/playwright/tools/LoginSessionMode.spec.mjs` verifies Local DB selector users, Admin session resolution, snapshot access, and isolated Local DB test storage. |
28
+
| DB Viewer scope |`admin/db-viewer.js` keeps DB Viewer Local Mem only with a clear Local Mem-only gateway diagnostic. |
29
+
30
+
## Validation Evidence
31
+
32
+
| Validation | Result |
33
+
| --- | --- |
34
+
| Changed-file syntax checks | PASS |
35
+
| Local DB/API contract validation | PASS |
36
+
| LoginSessionMode Playwright | PASS, 5/5 |
37
+
| AdminDbViewer Playwright | PASS, 5/5 |
38
+
| ProjectJourneyTool Playwright | PASS, 13/13 |
39
+
| Static import boundary audit | PASS |
40
+
|`git diff --check`| PASS, Git line-ending warnings only |
41
+
42
+
## Remaining Migration Notes
43
+
44
+
- Local DB is a server-side local JSON adapter for this PR slice, not a physical SQL/SQLite implementation.
45
+
- DB Viewer remains Local Mem only until a later PR explicitly enables Local DB viewer behavior.
46
+
- Playwright V8 coverage remains advisory for server-side modules that Chromium cannot collect directly.
0 commit comments