|
| 1 | +# PR_26177_OWNER_057-game-journey-metrics-regression-recovery Report |
| 2 | + |
| 3 | +Status: PASS |
| 4 | +Branch: PR_26177_OWNER_057-game-journey-metrics-regression-recovery |
| 5 | +Date: 2026-06-26 |
| 6 | + |
| 7 | +## Scope |
| 8 | + |
| 9 | +Recover the Game Journey completion metrics path so active Alfa and Owner work no longer surfaces the retired legacy SQLite regression. Preserve Postgres-backed Game Journey completion metrics as the active path and prevent Creator-facing UI from rendering the forbidden `Game Journey completion metrics unavailable:` warning. |
| 10 | + |
| 11 | +## Implementation Summary |
| 12 | + |
| 13 | +- Removed active runtime defaulting to `tmp/local-api/game-journey-completion-metrics.sqlite` in `createGameJourneyCompletionMetricsStore`. |
| 14 | +- Removed active runtime `legacyDbPath` guard plumbing from the Game Journey metrics store, repository, Local API router, and Playwright test server helper. |
| 15 | +- Updated `toolbox/tools-page-accordions.js` to render neutral Creator-safe progress outage wording instead of backend diagnostics. |
| 16 | +- Added a store-level regression test proving a retired default SQLite-shaped file does not block or get touched by active DB-backed metrics. |
| 17 | +- Added a targeted guardrail test proving active runtime JS/MJS under `src`, `assets`, and `toolbox` has no SQLite or `tmp/local-api` metrics references, excluding the migration-only utility. |
| 18 | +- Added a focused Playwright test proving the toolbox page does not render the forbidden warning, SQLite wording, local filesystem path, or Postgres internals when metrics are unavailable. |
| 19 | + |
| 20 | +## Reference Comparison |
| 21 | + |
| 22 | +- Compared the relevant strings in Bravo, Charlie, and Delta reference branches against current main. |
| 23 | +- Those branches contained the same legacy-default metrics store and forbidden toolbox warning strings. |
| 24 | +- Their non-error behavior depended on the retired SQLite file not being present at the default path. |
| 25 | +- This recovery fixes the active behavior directly so the current repo is not sensitive to that retired file. |
| 26 | + |
| 27 | +## Validation |
| 28 | + |
| 29 | +- PASS: `node --check` on modified source and test files. |
| 30 | +- PASS: `node ./scripts/run-node-test-files.mjs tests/dev-runtime/GameJourneyCompletionMetricsStore.test.mjs tests/dev-runtime/GameJourneyCompletionMetricsMigration.test.mjs`. |
| 31 | +- PASS: `npx playwright test tests/playwright/tools/GameJourneyTool.spec.mjs --project=playwright --workers=1 --reporter=line -g "Game Journey Local API persists completion metrics to Postgres|Toolbox renders Creator-safe Game Journey progress outage copy"`. |
| 32 | +- PASS: Direct proof against the actual existing `tmp/local-api/game-journey-completion-metrics.sqlite` file confirmed active DB metrics load 14 buckets, expose no legacy path fields, and do not touch the retired file. |
| 33 | +- PASS: Active runtime JS/MJS search found no SQLite, `.sqlite`, `better-sqlite`, `game-journey-completion-metrics.sqlite`, or `tmp/local-api` references outside the migration-only utility. |
| 34 | +- PASS: Runtime source search found no `Game Journey completion metrics unavailable` Creator-facing string. |
| 35 | +- PASS: `git diff --check` reported no whitespace errors. Git emitted line-ending warnings only. |
| 36 | + |
| 37 | +## Files |
| 38 | + |
| 39 | +- `src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs` |
| 40 | +- `src/dev-runtime/persistence/tool-repositories/game-journey-mock-repository.js` |
| 41 | +- `src/dev-runtime/server/local-api-router.mjs` |
| 42 | +- `tests/dev-runtime/GameJourneyCompletionMetricsStore.test.mjs` |
| 43 | +- `tests/helpers/playwrightRepoServer.mjs` |
| 44 | +- `tests/playwright/tools/GameJourneyTool.spec.mjs` |
| 45 | +- `tests/playwright/tools/IdeaBoardTableNotes.spec.mjs` |
| 46 | +- `toolbox/tools-page-accordions.js` |
| 47 | + |
| 48 | +## Artifact |
| 49 | + |
| 50 | +- `tmp/PR_26177_OWNER_057-game-journey-metrics-regression-recovery_delta.zip` |
0 commit comments