|
| 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 | +- Kept the explicit `legacyDbPath` guard intact for recovery/migration callers so legacy data is still protected from silent overwrite or deletion. |
| 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 active Postgres-backed metrics. |
| 17 | +- 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. |
| 18 | + |
| 19 | +## Reference Comparison |
| 20 | + |
| 21 | +- Compared the relevant strings in Bravo, Charlie, and Delta reference branches against current main. |
| 22 | +- Those branches contained the same legacy-default metrics store and forbidden toolbox warning strings. |
| 23 | +- Their non-error behavior depended on the retired SQLite file not being present at the default path. |
| 24 | +- This recovery fixes the active behavior directly so the current repo is not sensitive to that retired file. |
| 25 | + |
| 26 | +## Validation |
| 27 | + |
| 28 | +- PASS: `node --check` on modified source and test files. |
| 29 | +- PASS: `node ./scripts/run-node-test-files.mjs tests/dev-runtime/GameJourneyCompletionMetricsStore.test.mjs tests/dev-runtime/GameJourneyCompletionMetricsMigration.test.mjs`. |
| 30 | +- 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"`. |
| 31 | +- PASS: Direct proof against the actual existing `tmp/local-api/game-journey-completion-metrics.sqlite` file confirmed active Postgres metrics load 14 buckets and do not resolve a legacy path. |
| 32 | +- PASS: Runtime source search found no `Game Journey completion metrics unavailable` string. |
| 33 | +- PASS: Runtime source search found no active metrics-store default reference to `game-journey-completion-metrics.sqlite`, `GAMEFOUNDRY_GAME_JOURNEY_METRICS_DB_PATH`, or `defaultLegacySqlitePath`. |
| 34 | +- PASS: `git diff --check` reported no whitespace errors. Git emitted line-ending warnings only. |
| 35 | + |
| 36 | +## Files |
| 37 | + |
| 38 | +- `src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs` |
| 39 | +- `tests/dev-runtime/GameJourneyCompletionMetricsStore.test.mjs` |
| 40 | +- `tests/playwright/tools/GameJourneyTool.spec.mjs` |
| 41 | +- `toolbox/tools-page-accordions.js` |
| 42 | + |
| 43 | +## Artifact |
| 44 | + |
| 45 | +- `tmp/PR_26177_OWNER_057-game-journey-metrics-regression-recovery_delta.zip` |
0 commit comments