diff --git a/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md b/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md new file mode 100644 index 000000000..7e55465d3 --- /dev/null +++ b/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md @@ -0,0 +1,35 @@ +# PR_26171_GAMMA_024 Instruction Compliance Checklist + +## Start Gate + +- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`. +- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt`. +- PASS: PR name includes TEAM token `GAMMA`. +- PASS: Branch name mirrors TEAM token: `pr/26171-GAMMA-024-local-api-sqlite-reference-cleanup`. +- PASS: Started from `main`. +- PASS: Pulled latest `main`. +- PASS: Verified clean/synced `main` before branch creation. +- PASS: Verified PR #44 dependency head is in `main`. +- PASS: Verified PR #45 dependency head is in `main`. +- PASS: Implementation path is the active scoped Local API file: `src/dev-runtime/server/local-api-router.mjs`. + +## Scope Guard + +- PASS: One PR purpose only. +- PASS: Updated only scoped active files and required reports. +- PASS: Preserved Postgres-backed Messages routes. +- PASS: Preserved Postgres-backed Game Journey metrics routes. +- PASS: Did not pull or depend on PR #43 / `team/GAMMA/admin`. +- PASS: Did not touch archive/history references. +- PASS: Did not add feature work. +- PASS: Did not run samples. + +## Completion Gate + +- PASS: `docs_build/dev/reports/codex_review.diff` exists. +- PASS: `docs_build/dev/reports/codex_changed_files.txt` exists. +- PASS: PR-specific report exists. +- PASS: Manual validation notes exist. +- PASS: Instruction compliance checklist exists. +- PASS: Runtime JavaScript coverage notes were refreshed and included. +- PASS: Repo-structured ZIP path is documented: `tmp/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup_delta.zip`. diff --git a/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md b/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md new file mode 100644 index 000000000..162e58229 --- /dev/null +++ b/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md @@ -0,0 +1,19 @@ +# PR_26171_GAMMA_024 Manual Validation Notes + +Manual validation focused on the active Local API cleanup scope. + +## Notes + +- Confirmed `main` was clean/synced before branch creation. +- Confirmed PR #44 head commit `c62f16e49cfd5ae252f48ac9b9078a7f997a28c6` is in `main`. +- Confirmed PR #45 head commit `6f3c4d0b044eceb41dd207fe1e4786039e3f66ac` is in `main`. +- Confirmed the branch was created from fresh `main` and does not depend on open PR #43 / `team/GAMMA/admin`. +- Confirmed Local API still imports `createMessagesPostgresService` from `messages-postgres-service.mjs`. +- Confirmed Game Journey completion metrics still report Postgres through the targeted Playwright Local API route test. +- Confirmed no archive/history paths were changed. + +## Skipped Lanes + +- Samples: skipped because no sample files or sample runtime behavior changed. +- Full Playwright: skipped because the change is limited to Local API route metadata labels. +- Archive report rewrite: skipped because archive/history references are explicitly out of scope. diff --git a/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md b/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md new file mode 100644 index 000000000..d2c36baae --- /dev/null +++ b/docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md @@ -0,0 +1,53 @@ +# PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup + +TEAM ownership: GAMMA. + +## Scope + +Clean remaining Local API SQLite references after the Messages and Game Journey Postgres migrations landed in main. + +## Changes + +- Updated `src/dev-runtime/server/local-api-router.mjs`. +- Removed the remaining literal `SQLite` route metadata from Local API project workspace responses. +- Removed the stale `Local DB/SQLite metadata` promotion-planning label. +- Preserved the Postgres-backed Messages Local API route and response shapes. +- Preserved the Postgres-backed Game Journey completion metrics route and response shapes. +- Did not pull or depend on open PR #43 / `team/GAMMA/admin`. +- Did not touch archive/history references. + +## Validation + +Passed: +- `git diff --check` +- `node --check src/dev-runtime/server/local-api-router.mjs` +- `node --test --test-name-pattern "Messages Local API" tests/dev-runtime/DbSeedIntegrity.test.mjs` +- `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"` +- Inline Local API route check for `/api/project-workspace/projects`, verifying the cleaned `Local DB adapter` label and no `SQLite` text in that response. +- 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`. + +Observed outside scoped lane: +- 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. + +Skipped: +- Full samples smoke: no samples are in scope. +- Full Playwright suite: this PR only changes Local API route metadata labels and targeted route validation covered the touched surfaces. +- Archive/history cleanup: explicitly out of scope. + +## Reports + +- `docs_build/dev/reports/codex_review.diff` +- `docs_build/dev/reports/codex_changed_files.txt` +- `docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md` +- `docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md` +- `docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md` +- `docs_build/dev/reports/playwright_v8_coverage_report.txt` +- `docs_build/dev/reports/coverage_changed_js_guardrail.txt` + +## ZIP + +`tmp/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup_delta.zip` + +## Merge Control + +Not merged. EOD merge remains owner-controlled and requires explicit approval. diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt index 9f07c7577..78783a10a 100644 --- a/docs_build/dev/reports/codex_changed_files.txt +++ b/docs_build/dev/reports/codex_changed_files.txt @@ -1,30 +1,8 @@ -## git status --short -A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration-data-preservation-notes.md -A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration-instruction-compliance-checklist.md -A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration-manual-validation-notes.md -A docs_build/dev/reports/PR_26171_ALPHA_023-game-journey-postgres-metrics-migration.md -M docs_build/dev/reports/coverage_changed_js_guardrail.txt -M docs_build/dev/reports/playwright_v8_coverage_report.txt -M src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs -M src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js -M src/dev-runtime/server/local-api-router.mjs -A tests/helpers/gameJourneyCompletionMetricsPostgresClientStub.mjs -M tests/helpers/playwrightRepoServer.mjs -M tests/playwright/tools/GameJourneyTool.spec.mjs - -## git diff --cached --stat - ...es-metrics-migration-data-preservation-notes.md | 19 ++ - ...s-migration-instruction-compliance-checklist.md | 16 + - ...es-metrics-migration-manual-validation-notes.md | 20 ++ - ..._023-game-journey-postgres-metrics-migration.md | 45 +++ - .../dev/reports/coverage_changed_js_guardrail.txt | 30 +- - .../dev/reports/playwright_v8_coverage_report.txt | 85 +---- - .../game-journey-completion-metrics-store.mjs | 369 ++++++++++++--------- - .../game-journey-mock-repository.js | 6 +- - src/dev-runtime/server/local-api-router.mjs | 41 ++- - ...eJourneyCompletionMetricsPostgresClientStub.mjs | 87 +++++ - tests/helpers/playwrightRepoServer.mjs | 11 +- - tests/playwright/tools/GameJourneyTool.spec.mjs | 108 ++++-- - 12 files changed, 518 insertions(+), 319 deletions(-) - -## git diff --stat +docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-instruction-compliance-checklist.md +docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup-manual-validation-notes.md +docs_build/dev/reports/PR_26171_GAMMA_024-local-api-sqlite-reference-cleanup.md +docs_build/dev/reports/codex_changed_files.txt +docs_build/dev/reports/codex_review.diff +docs_build/dev/reports/coverage_changed_js_guardrail.txt +docs_build/dev/reports/playwright_v8_coverage_report.txt +src/dev-runtime/server/local-api-router.mjs diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff index 07d6bb81f..6544c848d 100644 Binary files a/docs_build/dev/reports/codex_review.diff and b/docs_build/dev/reports/codex_review.diff differ diff --git a/docs_build/dev/reports/coverage_changed_js_guardrail.txt b/docs_build/dev/reports/coverage_changed_js_guardrail.txt index aaedf0c8c..74a29674c 100644 --- a/docs_build/dev/reports/coverage_changed_js_guardrail.txt +++ b/docs_build/dev/reports/coverage_changed_js_guardrail.txt @@ -6,11 +6,7 @@ Missing changed runtime JS files are WARN, not FAIL. Source: Playwright/Chromium built-in V8 coverage from the active Playwright run. Changed runtime JS files considered: -(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 -(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 (0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only Guardrail warnings: -(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - WARNING: changed runtime JS file missing from coverage; advisory only -(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - WARNING: changed runtime JS file missing from coverage; advisory only (0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file missing from coverage; advisory only diff --git a/docs_build/dev/reports/playwright_v8_coverage_report.txt b/docs_build/dev/reports/playwright_v8_coverage_report.txt index 750d7c7da..86cc56dfe 100644 --- a/docs_build/dev/reports/playwright_v8_coverage_report.txt +++ b/docs_build/dev/reports/playwright_v8_coverage_report.txt @@ -12,34 +12,18 @@ Note: entry percentages use function coverage when available, otherwise line cov Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran. Exercised tool entry points detected: -(74%) Toolbox Index - exercised 3 runtime JS files +(0%) Toolbox Index - not exercised by this Playwright run (0%) Tool Template V2 - not exercised by this Playwright run -(63%) Theme V2 Shared JS - exercised 2 runtime JS files +(0%) Theme V2 Shared JS - not exercised by this Playwright run Changed runtime JS files covered: -(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 -(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 (0%) src/dev-runtime/server/local-api-router.mjs - WARNING: changed runtime JS file was not collected by Playwright V8 coverage; advisory only Files with executed line/function counts where available: -(53%) src/api/server-api-client.js - executed lines 167/167; executed functions 10/19 -(63%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 977/977; executed functions 54/86 -(64%) assets/theme-v2/js/tool-display-mode.js - executed lines 204/204; executed functions 9/14 -(65%) src/api/public-config-client.js - executed lines 209/209; executed functions 17/26 -(67%) src/api/game-journey-completion-api-client.js - executed lines 15/15; executed functions 2/3 -(74%) toolbox/game-journey/game-journey.js - executed lines 1652/1652; executed functions 110/149 -(76%) toolbox/tool-registry-api-client.js - executed lines 155/155; executed functions 22/29 -(100%) toolbox/game-journey/game-journey-api-client.js - executed lines 19/19; executed functions 2/2 +(100%) none - no covered runtime files Uncovered or low-coverage changed JS files: -(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - WARNING: uncovered changed runtime JS file; advisory only -(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - WARNING: uncovered changed runtime JS file; advisory only (0%) src/dev-runtime/server/local-api-router.mjs - WARNING: uncovered changed runtime JS file; advisory only Changed JS files considered: -(0%) src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs - changed JS file not collected as browser runtime coverage -(0%) src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js - changed JS file not collected as browser runtime coverage (0%) src/dev-runtime/server/local-api-router.mjs - changed JS file not collected as browser runtime coverage -(0%) tests/helpers/gameJourneyCompletionMetricsPostgresClientStub.mjs - changed JS file not collected as browser runtime coverage -(0%) tests/helpers/playwrightRepoServer.mjs - changed JS file not collected as browser runtime coverage -(0%) tests/playwright/tools/GameJourneyTool.spec.mjs - changed JS file not collected as browser runtime coverage diff --git a/src/dev-runtime/server/local-api-router.mjs b/src/dev-runtime/server/local-api-router.mjs index 0a4c82fca..314a35d03 100644 --- a/src/dev-runtime/server/local-api-router.mjs +++ b/src/dev-runtime/server/local-api-router.mjs @@ -2626,7 +2626,7 @@ class ApiRuntimeDataSource { return { action, database: "Local DB", - databaseEngine: "SQLite", + databaseEngine: "Local DB adapter", providerId: "local-api-project-workspace", serviceContract: "Web UI -> Local API/Service Contract -> Local DB", status: "PASS", @@ -3335,7 +3335,7 @@ class ApiRuntimeDataSource { safetyDiagnostic: "Read-only export planning only; no project records, asset references, or storage objects are changed.", safetyStatus: "PASS", status: "PLAN", - message: "Plan a read-only DEV export through Local API from Local DB/SQLite metadata, asset references, and configured project asset storage object keys.", + message: "Plan a read-only DEV export through Local API from project metadata, asset references, and configured project asset storage object keys.", }, { id: "ist-import-plan", @@ -3648,7 +3648,7 @@ LIMIT 1; : true, browserProductDataSsoT: false, database: "Local DB", - databaseEngine: "SQLite", + databaseEngine: "Local DB adapter", guestBrowsingAllowed: true, guestSavingAllowed: false, pageLocalProductDataArrays: false,