Skip to content

Commit cb8d8ef

Browse files
committed
Delete broken parent TTS profiles
1 parent 027fca6 commit cb8d8ef

6 files changed

Lines changed: 422 additions & 857 deletions

File tree

docs_build/database/seed/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
"messages_records": [],
2929
"messages_segments": []
3030
},
31-
"note": "Seed names are applied by the server-side Messages Postgres service. Browser pages must not seed authoritative records."
31+
"note": "Seed names are applied by the server-side Messages Postgres service. Browser pages must not seed authoritative records. Retired TTS parent profiles Default Balanced Profile, Hero, Merchant, Neutral, and Robot are pruned server-side and must not be reintroduced as seed records."
3232
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# PR_26177_BRAVO_007-delete-broken-tts-profile-parents
2+
3+
## Branch Validation
4+
- PASS: Initial branch was `bravo/26177-text-to-speech`.
5+
- PASS: Work stayed on the active Bravo branch; main was not checked out.
6+
- PASS: No `start_of_day` folders were modified.
7+
8+
## Scope Summary
9+
- Added server-side cleanup for retired TTS parent profiles during Messages service readiness.
10+
- Retired parent profile names: `Default Balanced Profile`, `Hero`, `Merchant`, `Neutral`, `Robot`.
11+
- Cleanup deletes retired parent profile rows, profile emotion child settings, stale message/sentence/event-action references that point at those retired parents, and orphaned profile-emotion join rows.
12+
- Updated the Messages seed documentation note and targeted service tests.
13+
14+
## Requirement Checklist
15+
- PASS: Delete parent TTS Profile records for `Default Balanced Profile`, `Hero`, `Merchant`, `Neutral`, and `Robot`.
16+
- PASS: Remove remaining database references to those retired profiles.
17+
- PASS: Remove child emotion settings for retired parent profiles.
18+
- PASS: Remove orphaned profile-emotion settings whose profile or emotion parent no longer exists.
19+
- PASS: Prevent retired empty parent rows from appearing in TTS UI by deleting them through the API/service layer before profile reads.
20+
- PASS: Seed documentation and targeted tests updated.
21+
- PASS: Guest save redirect behavior preserved; no TTS write-auth changes were made.
22+
- PASS: No governance changes.
23+
- PASS: No unrelated cleanup or repo-wide refactor.
24+
25+
## File Inventory
26+
- `docs_build/database/seed/messages.json`
27+
- `src/dev-runtime/messages/messages-postgres-service.mjs`
28+
- `tests/dev-runtime/MessagesPublishValidation.test.mjs`
29+
- `docs_build/dev/reports/PR_26177_BRAVO_007-delete-broken-tts-profile-parents.md`
30+
- `docs_build/dev/reports/codex_changed_files.txt`
31+
- `docs_build/dev/reports/codex_review.diff`
32+
33+
## DB/API Inventory
34+
- `messages_tts_profiles`: retired profile parent rows are deleted by exact creator-facing name.
35+
- `messages_tts_profile_emotion_settings`: child settings for retired profiles and orphaned join rows are deleted.
36+
- `messages_records`: stale rows referencing retired TTS profiles are deleted to avoid orphaned profile references.
37+
- `messages_segments`: stale rows referencing retired TTS profiles, plus child segments for deleted stale messages, are deleted.
38+
- `messages_event_actions`: stale actions referencing deleted stale messages are deleted.
39+
- Local API profile reads continue through `listTtsProfiles()` after `ensureReady()`.
40+
41+
## Test Inventory
42+
- Added `Messages seed cleanup deletes retired parent TTS profiles and orphaned settings`.
43+
- Existing `MessagesPublishValidation` coverage remains green for usage counts, delete blocking, profile-scoped emotions, and guest TTS write protection.
44+
- Existing TTS helper tests remain green for no hidden default seed profile/emotion behavior.
45+
46+
## Validation Lane Report
47+
- PASS: `node --check src/dev-runtime/messages/messages-postgres-service.mjs`
48+
- PASS: `node --check tests/dev-runtime/MessagesPublishValidation.test.mjs`
49+
- PASS: `node --test tests/dev-runtime/MessagesPublishValidation.test.mjs` (7/7)
50+
- PASS: `node --test --test-name-pattern "Messages Local API seeds" tests/dev-runtime/DbSeedIntegrity.test.mjs` (1/1)
51+
- PASS: `node --test tests/tools/Text2SpeechShell.test.mjs` (6/6)
52+
- BLOCKED: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs tests/playwright/tools/MessagesTool.spec.mjs tests/playwright/tools/EventsTool.spec.mjs --project=playwright`
53+
- 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`.
54+
55+
## Manual Validation Notes
56+
- Reviewed remaining references for the retired profile names.
57+
- Positive retired-name references are limited to the cleanup constant, seed note, and tests/assertions proving deletion or absence.
58+
- Existing `Neutral` voice gender terminology remains because it is not a TTS Profile parent record.
59+
60+
## Known Issues
61+
- Playwright browser validation remains blocked until the local Playwright Chromium browser is installed for this version.
62+
63+
## Repo-Structured ZIP
64+
- `tmp/PR_26177_BRAVO_007-delete-broken-tts-profile-parents_delta.zip`
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
assets/toolbox/text-to-speech/js/index.js
21
docs_build/database/seed/messages.json
32
docs_build/dev/reports/codex_changed_files.txt
43
docs_build/dev/reports/codex_review.diff
5-
docs_build/dev/reports/PR_26177_BRAVO_006-delete-broken-tts-seed-profiles.md
4+
docs_build/dev/reports/PR_26177_BRAVO_007-delete-broken-tts-profile-parents.md
65
src/dev-runtime/messages/messages-postgres-service.mjs
7-
tests/dev-runtime/DbSeedIntegrity.test.mjs
86
tests/dev-runtime/MessagesPublishValidation.test.mjs
9-
tests/playwright/tools/EventsTool.spec.mjs
10-
tests/playwright/tools/MessagesTool.spec.mjs
11-
tests/playwright/tools/TextToSpeechFunctional.spec.mjs
12-
tests/tools/Text2SpeechShell.test.mjs

0 commit comments

Comments
 (0)