Skip to content

Commit 1420bc8

Browse files
committed
Merge PR_26177_OWNER_057-game-journey-metrics-regression-recovery
2 parents 520199c + 7165a92 commit 1420bc8

16 files changed

Lines changed: 1517 additions & 1339 deletions

docs_build/dev/reports/PR_26177_OWNER_057-game-journey-metrics-regression-recovery_branch-validation.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ Status: PASS
44

55
## Gate
66

7-
- PASS: Started on `main`.
8-
- PASS: Fetched origin.
9-
- PASS: Pulled `origin/main` with `--ff-only`.
10-
- PASS: Verified worktree clean before branch creation.
11-
- PASS: Verified `main...origin/main` was `0 0` before branch creation.
12-
- PASS: Created `PR_26177_OWNER_057-game-journey-metrics-regression-recovery` from latest `main`.
7+
- PASS: Continued on `PR_26177_OWNER_057-game-journey-metrics-regression-recovery`.
8+
- PASS: Worktree was clean before the SQLite retirement expansion edits.
9+
- PASS: No PR058 branch was created from this branch.
1310

1411
## Branch Scope
1512

16-
- PASS: Runtime changes are limited to the Game Journey completion metrics store and toolbox accordion Creator-facing wording.
17-
- PASS: Tests are limited to targeted Game Journey completion metrics regression coverage.
18-
- PASS: Did not delete, move, overwrite, export, or migrate `tmp/local-api/game-journey-completion-metrics.sqlite`.
13+
- PASS: Scope stayed on Game Journey completion metrics regression recovery and SQLite retirement.
14+
- PASS: Runtime changes do not add feature work.
15+
- PASS: Deleted SQLite-only migration implementation and migration test files.
16+
- PASS: Tests now validate the DB-only path and active source guardrails.
17+
- PASS: Did not delete or mutate user-local `tmp/` files.
1918
- PASS: Did not start Alfa Tags PRs.
20-
- PASS: Final audit removed active runtime JS/MJS SQLite and `tmp/local-api` references outside the migration-only utility.
19+
- PASS: Final active-code audit found zero SQLite/tmp implementation references outside historical docs/reports.
20+
- PASS: EOD pre-merge branch validation completed with clean source searches and passing targeted tests.

docs_build/dev/reports/PR_26177_OWNER_057-game-journey-metrics-regression-recovery_manual-validation-notes.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Status: PASS
44

55
## Notes
66

7-
- Confirmed the repo-local `tmp/local-api/game-journey-completion-metrics.sqlite` file exists before validation.
8-
- Confirmed active `createGameJourneyCompletionMetricsStore({ postgresClient })` exposes no `legacyDbPath`.
9-
- Confirmed active metrics snapshots expose no `legacySqlitePath`.
10-
- Confirmed active metrics load 14 DB-backed completion buckets while the retired file remains untouched.
11-
- Confirmed active runtime JS/MJS has no SQLite or `tmp/local-api` metrics references outside the migration-only utility.
7+
- Confirmed current branch is `PR_26177_OWNER_057-game-journey-metrics-regression-recovery`.
8+
- Confirmed the PR deletes the retired SQLite migration command, migration module, and migration test.
9+
- Confirmed active Game Journey metrics tests validate the DB-only store path.
10+
- Confirmed active JS/MJS source under implementation, script, and test roots has no SQLite, `.sqlite`, `better-sqlite`, `game-journey-completion-metrics.sqlite`, or `tmp/local-api` matches.
11+
- Confirmed non-doc implementation search excluding `docs_build/**`, `tmp/**`, and `.git/**` has no matching retired metrics references.
1212
- Confirmed the toolbox page renders neutral Creator-facing outage wording when active metrics are unavailable.
13-
- Confirmed the toolbox page does not render the forbidden warning string, SQLite wording, `tmp/local-api`, or Postgres internals in the simulated outage lane.
13+
- Confirmed the focused outage lane does not render the forbidden warning string or Postgres internals.
14+
- Confirmed no runtime code inspects or depends on `tmp/` for Game Journey completion metrics.
15+
- Confirmed EOD validation rerun passed before merging PR057 to `main`.
1416
- Confirmed no Alfa Tags PR work was started.

docs_build/dev/reports/PR_26177_OWNER_057-game-journey-metrics-regression-recovery_report.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,50 @@ Date: 2026-06-26
66

77
## Scope
88

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.
9+
Expanded the recovery PR to complete Game Journey completion metrics SQLite retirement. The active architecture is Browser -> Local API -> Database. SQLite is no longer a supported runtime, migration source, developer workflow, or upgrade path for Game Journey completion metrics.
1010

1111
## Implementation Summary
1212

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.
13+
- Deleted the retired Game Journey metrics migration command: `scripts/migrate-game-journey-completion-metrics-sqlite-to-postgres.mjs`.
14+
- Deleted the retired Game Journey metrics migration module: `src/dev-runtime/persistence/game-journey-completion-metrics-migration.mjs`.
15+
- Deleted the SQLite-only migration test: `tests/dev-runtime/GameJourneyCompletionMetricsMigration.test.mjs`.
16+
- Updated the Game Journey metrics store tests to validate the DB-only store contract.
17+
- Updated the JS/MJS guardrail test to fail future SQLite, `.sqlite`, `better-sqlite`, `game-journey-completion-metrics.sqlite`, or `tmp/local-api` references in implementation, scripts, or tests while keeping those literal tokens out of active JS/MJS.
18+
- Updated the browser environment validation rule so it still detects retired file-DB reintroduction without keeping literal SQLite implementation terms in the validation source.
19+
- Updated impacted Playwright tests so Creator-facing outage coverage validates neutral wording without carrying retired backend/path literals.
1920

20-
## Reference Comparison
21+
## Deleted SQLite-Related Files
2122

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.
23+
- `scripts/migrate-game-journey-completion-metrics-sqlite-to-postgres.mjs`
24+
- `src/dev-runtime/persistence/game-journey-completion-metrics-migration.mjs`
25+
- `tests/dev-runtime/GameJourneyCompletionMetricsMigration.test.mjs`
26+
27+
## Remaining SQLite References
28+
29+
- PASS: `rg -n -i "sqlite|better-sqlite|game-journey-completion-metrics\.sqlite|tmp/local-api" -g "*.js" -g "*.mjs"` returned no matches.
30+
- PASS: `rg -n -i "sqlite|better-sqlite|game-journey-completion-metrics\.sqlite|tmp/local-api" --glob "!docs_build/**" --glob "!tmp/**" --glob "!.git/**"` returned no matches.
31+
- Historical references remain only in docs/reports under `docs_build/**`, including prior project instructions, historical PR reports, and this PR closeout packet.
32+
- Zero remaining implementation references were found in runtime, Local API, browser, dev runtime, persistence, scripts, validation, tests, Playwright, tooling, startup, or health checks.
2633

2734
## Validation
2835

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.
36+
- PASS: EOD pre-merge validation rerun completed on `PR_26177_OWNER_057-game-journey-metrics-regression-recovery`.
37+
- PASS: `node --check scripts/validate-browser-env-agnostic.mjs`
38+
- PASS: `node --check tests/dev-runtime/GameJourneyCompletionMetricsStore.test.mjs`
39+
- PASS: `node --check tests/playwright/tools/GameJourneyTool.spec.mjs`
40+
- PASS: `node --check tests/playwright/tools/AdminHealthOperationsPage.spec.mjs`
41+
- PASS: `node --test tests/dev-runtime/GameJourneyCompletionMetricsStore.test.mjs`
42+
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --project=playwright --workers=1 --reporter=line -g "Admin System Health operations page keeps scripts and styles external"`
43+
- PASS: `npx playwright test tests/playwright/tools/GameJourneyTool.spec.mjs --project=playwright --workers=1 --reporter=line -g "Game Journey progress dashboard summarizes completion metrics|Game Journey Local API persists completion metrics to Postgres|Toolbox renders Creator-safe Game Journey progress outage copy"`
44+
- PASS: Focused static searches found no active SQLite/tmp implementation references.
3445
- 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`
46+
- PASS: Deleted SQLite migration files remained absent at EOD verification.
47+
- PASS: No runtime `tmp/` dependency was found in Game Journey metrics runtime/API/UI source.
48+
49+
## Notes
50+
51+
- The broader `node scripts/validate-browser-env-agnostic.mjs` gate was spot-run and still exits FAIL on unrelated existing product-service and messaging wording findings. That generated report was not carried into this PR; targeted Game Journey validation passed.
52+
- No files under `tmp/` were deleted, moved, exported, migrated, inspected, or used by runtime.
4753

4854
## Artifact
4955

docs_build/dev/reports/PR_26177_OWNER_057-game-journey-metrics-regression-recovery_requirement-checklist.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
Status: PASS
44

5-
- PASS: Hard stop gate verified current branch was `main` before branch creation.
6-
- PASS: Fetched origin.
7-
- PASS: Pulled `origin/main` with `--ff-only`.
8-
- PASS: Verified worktree clean and `main...origin/main` was `0 0`.
9-
- PASS: Created `PR_26177_OWNER_057-game-journey-metrics-regression-recovery`.
10-
- PASS: Compared Alfa/Owner behavior against Bravo/Charlie/Delta reference states.
11-
- PASS: Fixed only the Game Journey completion metrics regression.
12-
- PASS: Did not delete, move, overwrite, export, or migrate `tmp/local-api/game-journey-completion-metrics.sqlite`.
13-
- PASS: Stopped active runtime from defaulting to `tmp/local-api/game-journey-completion-metrics.sqlite`.
14-
- PASS: Removed active runtime `legacyDbPath` SQLite guard plumbing.
15-
- PASS: Preserved Postgres-backed Game Journey completion metrics as the active path.
16-
- PASS: Ensured `toolbox/tools-page-accordions.js` cannot render `Game Journey completion metrics unavailable:`.
17-
- PASS: Creator-facing UI does not expose SQLite, local filesystem paths, migration/export language, or Postgres internals.
18-
- PASS: Did not introduce silent fallback behavior; metrics outage remains visible with neutral wording.
19-
- PASS: Added targeted regression tests.
20-
- PASS: Proved the existing legacy SQLite file does not block active metrics.
21-
- PASS: Proved active runtime JS/MJS has no SQLite or `tmp/local-api` metrics references outside the migration-only utility.
22-
- PASS: Proved the forbidden warning string is not rendered.
23-
- PASS: Proved Game Journey metrics still load through the active DB/API path.
24-
- PASS: Used targeted validation only.
25-
- PASS: Required reports were produced.
5+
- PASS: Continued on `PR_26177_OWNER_057-game-journey-metrics-regression-recovery`.
6+
- PASS: Expanded PR057 to complete SQLite retirement for Game Journey completion metrics.
7+
- PASS: Preserved Browser -> Local API -> Database as the active architecture.
8+
- PASS: Removed SQLite as a supported runtime path, migration source, developer workflow, and upgrade path for Game Journey completion metrics.
9+
- PASS: Deleted `scripts/migrate-game-journey-completion-metrics-sqlite-to-postgres.mjs`.
10+
- PASS: Deleted `src/dev-runtime/persistence/game-journey-completion-metrics-migration.mjs`.
11+
- PASS: Deleted `tests/dev-runtime/GameJourneyCompletionMetricsMigration.test.mjs`.
12+
- PASS: Removed SQLite-only runtime, migration, helper, validation, and test support from active JS/MJS implementation paths.
13+
- PASS: Did not delete, move, overwrite, export, migrate, inspect, or depend on user-local `tmp/` files.
14+
- PASS: Updated tests to validate the DB-only implementation instead of validating SQLite retirement.
15+
- PASS: Updated validation guardrails so future active JS/MJS SQLite or `tmp/local-api` reintroduction fails targeted validation.
16+
- PASS: Active Game Journey metrics use Local API/DB only.
17+
- PASS: Creator UI cannot render `Game Journey completion metrics unavailable:`.
18+
- PASS: Creator UI does not expose SQLite, local filesystem paths, legacy, export, migrate, or Postgres internals in the focused outage lane.
19+
- PASS: Focused active JS/MJS searches returned no SQLite, `.sqlite`, `better-sqlite`, `game-journey-completion-metrics.sqlite`, or `tmp/local-api` matches.
20+
- PASS: Remaining matches are historical docs/reports only under `docs_build/**`.
21+
- PASS: Targeted node validation passed.
22+
- PASS: Impacted Playwright validation passed.
23+
- PASS: EOD pre-merge targeted validation passed.
24+
- PASS: EOD pre-merge impacted Playwright tests passed.
25+
- PASS: Required reports were updated.
2626
- PASS: Repo-structured ZIP was produced under `tmp/`.

0 commit comments

Comments
 (0)