|
| 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` |
0 commit comments