|
| 1 | +# PR_26177_BRAVO_009-force-delete-broken-tts-profiles |
| 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 | +- Strengthened server-side setup cleanup for hard-deleted broken TTS parent profiles. |
| 10 | +- Added a setup/API validation guard that fails if any retired parent profile name survives cleanup. |
| 11 | +- Forced API profile reads to rerun retired-name cleanup before returning TTS Profiles. |
| 12 | +- Rejected creator/API saves that attempt to recreate retired TTS Profile names. |
| 13 | +- Added a TTS page display guard so retired profile names are filtered from UI rendering if a bad payload ever reaches the browser. |
| 14 | +- Preserved guest save redirect behavior to `account/sign-in.html`. |
| 15 | + |
| 16 | +## Required Name Absence |
| 17 | +- PASS: `Default Balanced Profile` is deleted from persisted TTS profiles and absent from API output after setup. |
| 18 | +- PASS: `Hero` is deleted from persisted TTS profiles and absent from API output after setup. |
| 19 | +- PASS: `Merchant` is deleted from persisted TTS profiles and absent from API output after setup. |
| 20 | +- PASS: `Neutral` is deleted from persisted TTS profiles and absent from API output after setup. |
| 21 | +- PASS: `Robot` is deleted from persisted TTS profiles and absent from API output after setup. |
| 22 | + |
| 23 | +## Requirement Checklist |
| 24 | +- PASS: Existing Local DB TTS profile records are deleted by exact retired name during Messages service setup/read cleanup. |
| 25 | +- PASS: Child TTS profile emotion settings for those parent profiles are deleted. |
| 26 | +- PASS: Message, sentence, and event-action references pointing at those parent profiles are deleted with the broken profile data. |
| 27 | +- PASS: API list responses cannot return those names; cleanup reruns before list output and validation throws if any remain. |
| 28 | +- PASS: TTS UI filters those names before rendering profile rows. |
| 29 | +- PASS: Validation fails if a retired name remains after setup cleanup. |
| 30 | +- PASS: Tests assert the names are absent from API output and TTS page rendering. |
| 31 | +- PASS: No fallback profiles or placeholder child rows were added. |
| 32 | +- PASS: Guest save redirect behavior is unchanged. |
| 33 | +- PASS: No governance changes or unrelated cleanup. |
| 34 | + |
| 35 | +## File Inventory |
| 36 | +- `assets/toolbox/text-to-speech/js/index.js` |
| 37 | +- `src/dev-runtime/messages/messages-postgres-service.mjs` |
| 38 | +- `tests/dev-runtime/MessagesPublishValidation.test.mjs` |
| 39 | +- `docs_build/dev/reports/PR_26177_BRAVO_009-force-delete-broken-tts-profiles.md` |
| 40 | +- `docs_build/dev/reports/codex_changed_files.txt` |
| 41 | +- `docs_build/dev/reports/codex_review.diff` |
| 42 | + |
| 43 | +## DB/API Inventory |
| 44 | +- `messages_tts_profiles`: retired parent rows are force-deleted by name. |
| 45 | +- `messages_tts_profile_emotion_settings`: child settings for retired parents and orphaned settings are deleted. |
| 46 | +- `messages_records`, `messages_segments`, `messages_event_actions`: stale references to deleted retired profiles are deleted to avoid orphaned DB references. |
| 47 | +- `GET /api/messages/tts-profiles`: reruns cleanup and validation before returning profile output. |
| 48 | +- `POST/PATCH /api/messages/tts-profiles`: rejects retired profile names instead of recreating them. |
| 49 | + |
| 50 | +## Test Inventory |
| 51 | +- Updated `Messages seed cleanup deletes retired parent TTS profiles and orphaned settings` to assert each retired name is absent from persisted records and API output. |
| 52 | +- Added `Messages seed setup fails if retired TTS profile validation still finds broken names`. |
| 53 | +- Updated empty-save coverage to assert retired names cannot be recreated through `createTtsProfile`. |
| 54 | +- Existing TTS Playwright spec contains page-rendering absence assertions for the retired names. |
| 55 | + |
| 56 | +## Validation Lane Report |
| 57 | +- PASS: Explicit search ran for `Default Balanced Profile|Hero|Merchant|Neutral|Robot`; remaining hits are cleanup constants, seed notes, negative assertions, and voice-gender terminology only. |
| 58 | +- PASS: `node --check src/dev-runtime/messages/messages-postgres-service.mjs` |
| 59 | +- PASS: `node --check assets/toolbox/text-to-speech/js/index.js` |
| 60 | +- PASS: `node --check tests/dev-runtime/MessagesPublishValidation.test.mjs` |
| 61 | +- PASS: `node --check tests/playwright/tools/TextToSpeechFunctional.spec.mjs` |
| 62 | +- PASS: `node --test tests/dev-runtime/MessagesPublishValidation.test.mjs` (9/9) |
| 63 | +- PASS: `node --test --test-name-pattern "Messages Local API seeds" tests/dev-runtime/DbSeedIntegrity.test.mjs` (1/1) |
| 64 | +- PASS: `node --test tests/tools/Text2SpeechShell.test.mjs` (6/6) |
| 65 | +- BLOCKED: `npx playwright test tests/playwright/tools/TextToSpeechFunctional.spec.mjs tests/playwright/tools/MessagesTool.spec.mjs tests/playwright/tools/EventsTool.spec.mjs --project=playwright` |
| 66 | + - 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`. |
| 67 | + |
| 68 | +## Manual Validation Notes |
| 69 | +- Reviewed server setup/read cleanup paths and TTS page profile loading. |
| 70 | +- Confirmed no fallback profile or placeholder child-emotion creation was added. |
| 71 | +- Browser/manual UI validation remains blocked by the missing local Playwright Chromium install. |
| 72 | + |
| 73 | +## Known Issues |
| 74 | +- Playwright browser validation cannot complete in this environment until the matching Chromium browser is installed. |
| 75 | + |
| 76 | +## Repo-Structured ZIP |
| 77 | +- `tmp/PR_26177_BRAVO_009-force-delete-broken-tts-profiles_delta.zip` |
0 commit comments