Skip to content

Commit 6e03515

Browse files
authored
Merge PR #46: PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup
PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup
2 parents 4bf6db2 + a6cd320 commit 6e03515

8 files changed

Lines changed: 121 additions & 56 deletions
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PR_26171_GAMMA_024 Instruction Compliance Checklist
2+
3+
## Start Gate
4+
5+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
6+
- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt`.
7+
- PASS: PR name includes TEAM token `GAMMA`.
8+
- PASS: Branch name mirrors TEAM token: `pr/26171-GAMMA-024-local-api-sqlite-reference-cleanup`.
9+
- PASS: Started from `main`.
10+
- PASS: Pulled latest `main`.
11+
- PASS: Verified clean/synced `main` before branch creation.
12+
- PASS: Verified PR #44 dependency head is in `main`.
13+
- PASS: Verified PR #45 dependency head is in `main`.
14+
- PASS: Implementation path is the active scoped Local API file: `src/dev-runtime/server/local-api-router.mjs`.
15+
16+
## Scope Guard
17+
18+
- PASS: One PR purpose only.
19+
- PASS: Updated only scoped active files and required reports.
20+
- PASS: Preserved Postgres-backed Messages routes.
21+
- PASS: Preserved Postgres-backed Game Journey metrics routes.
22+
- PASS: Did not pull or depend on PR #43 / `team/GAMMA/admin`.
23+
- PASS: Did not touch archive/history references.
24+
- PASS: Did not add feature work.
25+
- PASS: Did not run samples.
26+
27+
## Completion Gate
28+
29+
- PASS: `docs_build/dev/reports/codex_review.diff` exists.
30+
- PASS: `docs_build/dev/reports/codex_changed_files.txt` exists.
31+
- PASS: PR-specific report exists.
32+
- PASS: Manual validation notes exist.
33+
- PASS: Instruction compliance checklist exists.
34+
- PASS: Runtime JavaScript coverage notes were refreshed and included.
35+
- PASS: Repo-structured ZIP path is documented: `tmp/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup_delta.zip`.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# PR_26171_GAMMA_024 Manual Validation Notes
2+
3+
Manual validation focused on the active Local API cleanup scope.
4+
5+
## Notes
6+
7+
- Confirmed `main` was clean/synced before branch creation.
8+
- Confirmed PR #44 head commit `c62f16e49cfd5ae252f48ac9b9078a7f997a28c6` is in `main`.
9+
- Confirmed PR #45 head commit `6f3c4d0b044eceb41dd207fe1e4786039e3f66ac` is in `main`.
10+
- Confirmed the branch was created from fresh `main` and does not depend on open PR #43 / `team/GAMMA/admin`.
11+
- Confirmed Local API still imports `createMessagesPostgresService` from `messages-postgres-service.mjs`.
12+
- Confirmed Game Journey completion metrics still report Postgres through the targeted Playwright Local API route test.
13+
- Confirmed no archive/history paths were changed.
14+
15+
## Skipped Lanes
16+
17+
- Samples: skipped because no sample files or sample runtime behavior changed.
18+
- Full Playwright: skipped because the change is limited to Local API route metadata labels.
19+
- Archive report rewrite: skipped because archive/history references are explicitly out of scope.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup
2+
3+
TEAM ownership: GAMMA.
4+
5+
## Scope
6+
7+
Clean remaining Local API SQLite references after the Messages and Game Journey Postgres migrations landed in main.
8+
9+
## Changes
10+
11+
- Updated `src/dev-runtime/server/local-api-router.mjs`.
12+
- Removed the remaining literal `SQLite` route metadata from Local API project workspace responses.
13+
- Removed the stale `Local DB/SQLite metadata` promotion-planning label.
14+
- Preserved the Postgres-backed Messages Local API route and response shapes.
15+
- Preserved the Postgres-backed Game Journey completion metrics route and response shapes.
16+
- Did not pull or depend on open PR #43 / `team/GAMMA/admin`.
17+
- Did not touch archive/history references.
18+
19+
## Validation
20+
21+
Passed:
22+
- `git diff --check`
23+
- `node --check src/dev-runtime/server/local-api-router.mjs`
24+
- `node --test --test-name-pattern "Messages Local API" tests/dev-runtime/DbSeedIntegrity.test.mjs`
25+
- `npx playwright test tests/playwright/tools/GameJourneyTool.spec.mjs --config=codex_playwright_system_chrome.config.cjs --project=playwright -g "Game Journey Local API persists completion metrics to Postgres"`
26+
- Inline Local API route check for `/api/project-workspace/projects`, verifying the cleaned `Local DB adapter` label and no `SQLite` text in that response.
27+
- Targeted text check confirmed no `sqlite`, `messages-sqlite`, `createMessagesSqliteService`, `DatabaseSync`, `node:sqlite`, `messages.sqlite`, or `GAMEFOUNDRY_MESSAGES_SQLITE_PATH` match remains in `src/dev-runtime/server/local-api-router.mjs`.
28+
29+
Observed outside scoped lane:
30+
- A broad `node --test tests/dev-runtime/DbSeedIntegrity.test.mjs` run passed the Messages Local API case but failed two unrelated `/api/local-db/snapshot` seed/reseed cases. Those local-db snapshot cases are outside this cleanup scope and were not used as completion evidence.
31+
32+
Skipped:
33+
- Full samples smoke: no samples are in scope.
34+
- Full Playwright suite: this PR only changes Local API route metadata labels and targeted route validation covered the touched surfaces.
35+
- Archive/history cleanup: explicitly out of scope.
36+
37+
## Reports
38+
39+
- `docs_build/dev/reports/codex_review.diff`
40+
- `docs_build/dev/reports/codex_changed_files.txt`
41+
- `docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md`
42+
- `docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md`
43+
- `docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md`
44+
- `docs_build/dev/reports/playwright_v8_coverage_report.txt`
45+
- `docs_build/dev/reports/coverage_changed_js_guardrail.txt`
46+
47+
## ZIP
48+
49+
`tmp/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup_delta.zip`
50+
51+
## Merge Control
52+
53+
Not merged. EOD merge remains owner-controlled and requires explicit approval.
Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
1-
## git status --short
2-
A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration-data-preservation-notes.md
3-
A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration-instruction-compliance-checklist.md
4-
A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration-manual-validation-notes.md
5-
A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration.md
6-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
7-
M docs_build/dev/reports/playwright_v8_coverage_report.txt
8-
M src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs
9-
M src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js
10-
M src/dev-runtime/server/local-api-router.mjs
11-
A tests/helpers/gameJourneyCompletionMetricsPostgresClientStub.mjs
12-
M tests/helpers/playwrightRepoServer.mjs
13-
M tests/playwright/tools/GameJourneyTool.spec.mjs
14-
15-
## git diff --cached --stat
16-
...es-metrics-migration-data-preservation-notes.md | 19 ++
17-
...s-migration-instruction-compliance-checklist.md | 16 +
18-
...es-metrics-migration-manual-validation-notes.md | 20 ++
19-
..._023-game-journey-postgres-metrics-migration.md | 45 +++
20-
.../dev/reports/coverage_changed_js_guardrail.txt | 30 +-
21-
.../dev/reports/playwright_v8_coverage_report.txt | 85 +----
22-
.../game-journey-completion-metrics-store.mjs | 369 ++++++++++++---------
23-
.../game-journey-mock-repository.js | 6 +-
24-
src/dev-runtime/server/local-api-router.mjs | 41 ++-
25-
...eJourneyCompletionMetricsPostgresClientStub.mjs | 87 +++++
26-
tests/helpers/playwrightRepoServer.mjs | 11 +-
27-
tests/playwright/tools/GameJourneyTool.spec.mjs | 108 ++++--
28-
12 files changed, 518 insertions(+), 319 deletions(-)
29-
30-
## git diff --stat
1+
docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md
2+
docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md
3+
docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md
4+
docs_build/dev/reports/codex_changed_files.txt
5+
docs_build/dev/reports/codex_review.diff
6+
docs_build/dev/reports/coverage_changed_js_guardrail.txt
7+
docs_build/dev/reports/playwright_v8_coverage_report.txt
8+
src/dev-runtime/server/local-api-router.mjs
-117 KB
Binary file not shown.

docs_build/dev/reports/coverage_changed_js_guardrail.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL.
66
Source: Playwright/Chromium built-in V8 coverage from the active Playwright run.
77

88
Changed runtime JS files considered:
9-
(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
10-
(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
119
(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
1210

1311
Guardrail warnings:
14-
(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - WARNING: changed runtime JS file missing from coverage; advisory only
15-
(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only
1612
(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,18 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(74%) Toolbox Index - exercised 3 runtime JS files
15+
(0%) Toolbox Index - not exercised by this Playwright run
1616
(0%) Tool Template V2 - not exercised by this Playwright run
17-
(63%) Theme V2 Shared JS - exercised 2 runtime JS files
17+
(0%) Theme V2 Shared JS - not exercised by this Playwright run
1818

1919
Changed runtime JS files covered:
20-
(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
21-
(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2220
(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only
2321

2422
Files with executed line/function counts where available:
25-
(53%) src/api/server-api-client.js - executed lines 167/167; executed functions 10/19
26-
(63%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 977/977; executed functions 54/86
27-
(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 204/204; executed functions 9/14
28-
(65%) src/api/public-config-client.js - executed lines 209/209; executed functions 17/26
29-
(67%) src/api/game-journey-completion-api-client.js - executed lines 15/15; executed functions 2/3
30-
(74%) toolbox/game-journey/game-journey.js - executed lines 1652/1652; executed functions 110/149
31-
(76%) toolbox/tool-registry-api-client.js - executed lines 155/155; executed functions 22/29
32-
(100%) toolbox/game-journey/game-journey-api-client.js - executed lines 19/19; executed functions 2/2
23+
(100%) none - no covered runtime files
3324

3425
Uncovered or low-coverage changed JS files:
35-
(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - WARNING: uncovered changed runtime JS file; advisory only
36-
(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only
3726
(0%) src/dev-runtime/server/local-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only
3827

3928
Changed JS files considered:
40-
(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - changed JS file not collected as browser runtime coverage
41-
(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - changed JS file not collected as browser runtime coverage
4229
(0%) src/dev-runtime/server/local-api-router.mjs - changed JS file not collected as browser runtime coverage
43-
(0%) tests/helpers/gameJourneyCompletionMetricsPostgresClientStub.mjs - changed JS file not collected as browser runtime coverage
44-
(0%) tests/helpers/playwrightRepoServer.mjs - changed JS file not collected as browser runtime coverage
45-
(0%) tests/playwright/tools/GameJourneyTool.spec.mjs - changed JS file not collected as browser runtime coverage

src/dev-runtime/server/local-api-router.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,7 +2626,7 @@ class ApiRuntimeDataSource {
26262626
return {
26272627
action,
26282628
database: "Local DB",
2629-
databaseEngine: "SQLite",
2629+
databaseEngine: "Local DB adapter",
26302630
providerId: "local-api-project-workspace",
26312631
serviceContract: "Web UI -> Local API/Service Contract -> Local DB",
26322632
status: "PASS",
@@ -3335,7 +3335,7 @@ class ApiRuntimeDataSource {
33353335
safetyDiagnostic: "Read-only export planning only; no project records, asset references, or storage objects are changed.",
33363336
safetyStatus: "PASS",
33373337
status: "PLAN",
3338-
message: "Plan a read-only DEV export through Local API from Local DB/SQLite metadata, asset references, and configured project asset storage object keys.",
3338+
message: "Plan a read-only DEV export through Local API from project metadata, asset references, and configured project asset storage object keys.",
33393339
},
33403340
{
33413341
id: "ist-import-plan",
@@ -3648,7 +3648,7 @@ LIMIT 1;
36483648
: true,
36493649
browserProductDataSsoT: false,
36503650
database: "Local DB",
3651-
databaseEngine: "SQLite",
3651+
databaseEngine: "Local DB adapter",
36523652
guestBrowsingAllowed: true,
36533653
guestSavingAllowed: false,
36543654
pageLocalProductDataArrays: false,

0 commit comments

Comments
 (0)