Skip to content

Commit e37112b

Browse files
committed
Fix Local DB snapshot EOD gate
1 parent 36a5749 commit e37112b

9 files changed

Lines changed: 359 additions & 157 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"group": "Idea Board",
3+
"groupKey": "idea-board",
4+
"owner": "docs_build/database/seed/guest",
5+
"readOnly": true,
6+
"writableByGuest": false,
7+
"signInRedirect": "account/sign-in.html",
8+
"tables": {},
9+
"samplePackages": [
10+
{
11+
"key": "guest-idea-board-starter",
12+
"audience": "guest",
13+
"createdBy": "01K2GFSJ0Y0000000000000054",
14+
"groupKey": "idea-board",
15+
"label": "Guest Idea Board starter",
16+
"loadablePath": "toolbox/idea-board/index.html",
17+
"readOnly": true,
18+
"sampleKind": "toolSeed",
19+
"signInRedirect": "account/sign-in.html",
20+
"source": "docs_build/database/seed/guest/idea-board.json",
21+
"toolKey": "idea-board",
22+
"toolName": "Idea Board",
23+
"writableByGuest": false
24+
}
25+
]
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"group": "Message Studio",
3+
"groupKey": "messages",
4+
"owner": "docs_build/database/seed/guest",
5+
"readOnly": true,
6+
"writableByGuest": false,
7+
"signInRedirect": "account/sign-in.html",
8+
"tables": {},
9+
"samplePackages": [
10+
{
11+
"key": "guest-messages-starter",
12+
"audience": "guest",
13+
"createdBy": "01K2GFSJ0Y0000000000000054",
14+
"groupKey": "messages",
15+
"label": "Guest Message Studio starter",
16+
"loadablePath": "toolbox/messages/index.html",
17+
"readOnly": true,
18+
"sampleKind": "toolSeed",
19+
"signInRedirect": "account/sign-in.html",
20+
"source": "docs_build/database/seed/guest/messages.json",
21+
"toolKey": "messages",
22+
"toolName": "Message Studio",
23+
"writableByGuest": false
24+
}
25+
]
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"group": "Text To Speech",
3+
"groupKey": "text-to-speech",
4+
"owner": "docs_build/database/seed/guest",
5+
"readOnly": true,
6+
"writableByGuest": false,
7+
"signInRedirect": "account/sign-in.html",
8+
"tables": {},
9+
"samplePackages": [
10+
{
11+
"key": "guest-text-to-speech-starter",
12+
"audience": "guest",
13+
"createdBy": "01K2GFSJ0Y0000000000000054",
14+
"groupKey": "text-to-speech",
15+
"label": "Guest Text To Speech starter",
16+
"loadablePath": "toolbox/text-to-speech/index.html",
17+
"readOnly": true,
18+
"sampleKind": "toolSeed",
19+
"signInRedirect": "account/sign-in.html",
20+
"source": "docs_build/database/seed/guest/text-to-speech.json",
21+
"toolKey": "text-to-speech",
22+
"toolName": "Text To Speech",
23+
"writableByGuest": false
24+
}
25+
]
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"group": "Game Crew",
3+
"groupKey": "users",
4+
"owner": "docs_build/database/seed/guest",
5+
"readOnly": true,
6+
"writableByGuest": false,
7+
"signInRedirect": "account/sign-in.html",
8+
"tables": {},
9+
"samplePackages": [
10+
{
11+
"key": "guest-users-starter",
12+
"audience": "guest",
13+
"createdBy": "01K2GFSJ0Y0000000000000054",
14+
"groupKey": "users",
15+
"label": "Guest Game Crew starter",
16+
"loadablePath": "toolbox/game-crew/index.html",
17+
"readOnly": true,
18+
"sampleKind": "toolSeed",
19+
"signInRedirect": "account/sign-in.html",
20+
"source": "docs_build/database/seed/guest/users.json",
21+
"toolKey": "users",
22+
"toolName": "Game Crew",
23+
"writableByGuest": false
24+
}
25+
]
26+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# PR_26177_BRAVO_013-fix-local-db-snapshot-eod-gate
2+
3+
## Branch Validation
4+
- PASS: Work stayed on `bravo/26177-text-to-speech`.
5+
- PASS: Main was not checked out during the PR_013 fix.
6+
- PASS: No `start_of_day` folders were modified.
7+
8+
## Scope Summary
9+
- Restored the explicit DEV Local DB snapshot route required by the EOD gate: `GET /api/local-db/snapshot`.
10+
- Restored the explicit DEV Local DB reseed route required by the EOD gate: `POST /api/local-db/seed`.
11+
- Restored the explicit test-only state replacement route used by the same Local DB seed/reseed tests: `POST /api/dev/testing/mock-db-state`.
12+
- Kept the product-data/Postgres snapshot route strict and unchanged.
13+
- Rejected non-`local-db` legacy mode ids so `local-mem` does not become a fallback.
14+
- Completed active-tool guest seed metadata for `idea-board`, `messages`, `text-to-speech`, and `users` with read-only package entries only.
15+
16+
## Requirement Checklist
17+
- PASS: Investigated why `/api/local-db/snapshot` was not returning ok.
18+
- PASS: Fixed only the Local DB snapshot/seed/reseed and EOD validation setup needed for the failing command.
19+
- PASS: Did not change Text to Speech behavior.
20+
- PASS: Did not add a Local Mem fallback.
21+
- PASS: Did not reintroduce SQLite.
22+
- PASS: Did not add silent fallback behavior.
23+
- PASS: Preserved Local DB/Postgres direction.
24+
- PASS: No governance changes or unrelated cleanup.
25+
- PASS: EOD report was updated with the final hard-stop outcome.
26+
27+
## Root Cause
28+
- `GET /api/local-db/snapshot` had no active route and returned `404`.
29+
- After the route was restored, the full product-data snapshot path tried to read Postgres-backed Game Journey completion metrics in the Local DB seed test environment.
30+
- The Local DB testing snapshot now reads seeded Local DB state without requiring that Postgres-only completion metrics store.
31+
- The same EOD unit lane then exposed missing read-only guest seed package coverage for active tool groups; minimal guest seed metadata was added for those active groups.
32+
33+
## File Inventory
34+
- `src/dev-runtime/server/local-api-router.mjs`
35+
- `docs_build/database/seed/guest/idea-board.json`
36+
- `docs_build/database/seed/guest/messages.json`
37+
- `docs_build/database/seed/guest/text-to-speech.json`
38+
- `docs_build/database/seed/guest/users.json`
39+
- `docs_build/dev/reports/PR_26177_BRAVO_013-fix-local-db-snapshot-eod-gate.md`
40+
- `docs_build/dev/reports/PR_26177_BRAVO_EOD-closeout.md`
41+
- `docs_build/dev/reports/codex_changed_files.txt`
42+
- `docs_build/dev/reports/codex_review.diff`
43+
44+
## Validation
45+
- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
46+
- PASS: `node --test tests/tools/Text2SpeechShell.test.mjs tests/tools/MessagesPlaybackSource.test.mjs tests/dev-runtime/MessagesPublishValidation.test.mjs tests/dev-runtime/DbSeedIntegrity.test.mjs` (23/23)
47+
- FAIL/BLOCKED: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs tests/playwright/tools/MessagesTool.spec.mjs --project=playwright`
48+
- Browser launch failed before page code ran because Chromium is missing at `C:\Users\davidq\AppData\Local\ms-playwright\chromium-1217\chrome-win64\chrome.exe`.
49+
50+
## EOD Outcome
51+
- Unit/API EOD blocker fixed.
52+
- EOD hard-stopped at impacted Playwright validation.
53+
- Main was not touched.
54+
- Bravo was not pushed.
55+
- Main merge and branch deletion were not attempted.
56+
57+
## Repo-Structured ZIP
58+
- `tmp/PR_26177_BRAVO_013-fix-local-db-snapshot-eod-gate_delta.zip`
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# PR_26177_BRAVO_EOD-closeout
2+
3+
=========================================
4+
Branch Validation
5+
=========================================
6+
FAIL
7+
- PASS: Started on Bravo branch `bravo/26177-text-to-speech`.
8+
- FAIL: Ended on main. EOD hard-stopped on `bravo/26177-text-to-speech` because impacted Playwright validation failed before push or merge.
9+
- PASS: Working tree clean after PR_013 report/fix commit is expected; verify with final `git status --short --branch`.
10+
- FAIL: Local/origin synchronized. Bravo remains ahead of `origin/main` and was not pushed because EOD validation failed.
11+
12+
=========================================
13+
Merged PRs
14+
=========================================
15+
Bravo branch dependency order reviewed:
16+
1. `9f2aadf99` Add Bravo TTS profiles audit report
17+
2. `237eee84e` Correct Bravo team branch governance
18+
3. `3c08e1dbd` Complete Text to Speech profile and emotion gaps
19+
4. `675244bae` Fix emotion preview parent voice inheritance
20+
5. `c983edbcd` Fix TTS seed profiles and guest save routing
21+
6. `027fca68b` Delete broken TTS seed profiles
22+
7. `cb8d8ef37` Delete broken parent TTS profiles
23+
8. `87db3eb65` Delete empty TTS profile parents
24+
9. `9b8af1f2c` Force delete broken TTS profiles
25+
10. `36a574959` Add emotion editor preview playback
26+
11. PR_26177_BRAVO_013 Fix Local DB snapshot EOD gate
27+
28+
No merge into main was attempted. No merge conflicts were encountered because the hard stop occurred during Playwright validation before main integration.
29+
30+
=========================================
31+
Validation
32+
=========================================
33+
FAIL
34+
- PASS: Unit tests.
35+
- Command: `node --test tests/tools/Text2SpeechShell.test.mjs tests/tools/MessagesPlaybackSource.test.mjs tests/dev-runtime/MessagesPublishValidation.test.mjs tests/dev-runtime/DbSeedIntegrity.test.mjs`
36+
- Result: 23 passing, 0 failing.
37+
- FAIL: Playwright.
38+
- Command: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs tests/playwright/tools/MessagesTool.spec.mjs --project=playwright`
39+
- Result: 9 failed before page code ran.
40+
- Failure: Chromium executable is missing at `C:\Users\davidq\AppData\Local\ms-playwright\chromium-1217\chrome-win64\chrome.exe`.
41+
- PASS: Local API. `/api/local-db/snapshot`, `/api/local-db/seed`, and `/api/dev/testing/mock-db-state` passed through `DbSeedIntegrity.test.mjs`.
42+
- PASS: Text to Speech. Focused TTS unit assertions passed.
43+
- PASS: Emotion Profiles. Focused Messages publish/profile assertions passed.
44+
- PASS: TTS Profiles. Focused TTS profile assertions passed.
45+
- PASS: Messages integration. Focused Messages integration assertions passed.
46+
47+
=========================================
48+
Repository Status
49+
=========================================
50+
Current branch: `bravo/26177-text-to-speech`
51+
Working tree: expected clean after PR_013 commit
52+
Local commits ahead: expected 11 after PR_013 commit
53+
Remote commits ahead: 0 relative to `origin/main`
54+
Latest main commit: `8cdd87bf2 Merge pull request #208 from ToolboxAid/PR_26177_DELTA_056-shared-validation-assertions`
55+
56+
=========================================
57+
Outstanding Bravo Work
58+
=========================================
59+
- Install or restore the expected Playwright Chromium browser at `C:\Users\davidq\AppData\Local\ms-playwright\chromium-1217\chrome-win64\chrome.exe`.
60+
- Rerun impacted Playwright coverage:
61+
- `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs tests/playwright/tools/MessagesTool.spec.mjs --project=playwright`
62+
- Push the Bravo branch only after all EOD validation passes.
63+
- Merge Bravo into main only after all EOD validation passes.
64+
- Push main and verify local/origin synchronization.
65+
- Delete the Bravo branch locally and remotely only after main is clean and synchronized.
66+
67+
=========================================
68+
Manual Validation
69+
=========================================
70+
- Verified EOD retry stayed on `bravo/26177-text-to-speech`.
71+
- Verified the exact unit/API validation command now passes 23/23.
72+
- Verified impacted Playwright is blocked by missing Chromium before page code runs.
73+
- Stopped before push, main merge, main push, and branch deletion because Playwright validation failed.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
assets/toolbox/text-to-speech/js/index.js
1+
docs_build/database/seed/guest/idea-board.json
2+
docs_build/database/seed/guest/messages.json
3+
docs_build/database/seed/guest/text-to-speech.json
4+
docs_build/database/seed/guest/users.json
25
docs_build/dev/reports/codex_changed_files.txt
36
docs_build/dev/reports/codex_review.diff
4-
docs_build/dev/reports/PR_26177_BRAVO_012-add-emotion-editor-preview.md
5-
tests/playwright/tools/TextToSpeechFunctional.spec.mjs
6-
tests/tools/Text2SpeechShell.test.mjs
7+
docs_build/dev/reports/PR_26177_BRAVO_013-fix-local-db-snapshot-eod-gate.md
8+
docs_build/dev/reports/PR_26177_BRAVO_EOD-closeout.md
9+
src/dev-runtime/server/local-api-router.mjs

0 commit comments

Comments
 (0)