Skip to content

chore(integration): record live-mode, settings, and eviction verification - #20

Merged
prateekchaplot merged 1 commit into
mainfrom
arch/tts/t4.1
Nov 23, 2026
Merged

prateekchaplot merged 1 commit into
mainfrom
arch/tts/t4.1

Conversation

@prateekchaplot

Copy link
Copy Markdown
Owner

Task T4.1 from docs/ARCHITECTURE.md §14.2 — Live wiring + eviction + settings persistence. Deps P2, P3 are merged (#14–#19).

Verification

Live browser flow — 36/36 checks, run twice (temporary Playwright script, deleted after the run):

  • built bundle served by tts from frontend/dist (TTS_DATA_DIR=.venv\tts-data), and
  • behind the Vite dev proxy (npx vite --port 5173, /api → 8321), per §14.5 integration point 3.

Covered: no mock badge, en_US-lessac-medium listed/selected, preview WAV 200, SSE Queued → Generating 0/3 … 3/3 → Audio ready. (R6 proxy buffering not observed), blob audio 4.1 s with 12 words / 3 cues, playback advance with single-word highlight following, cue-click and ±5 s seek, WAV/SRT/VTT downloads named hello-world-this-is-a-live_<UTC>.{wav,srt,vtt} with RIFF / SRT / WEBVTT content, history list → restore → delete → empty state, rate+volume persisted on blur and survived a reload, no console/page errors.

Eviction — 9/9 checks: 25 sequential live generations at the default limit 20 (6.8 s) → GET /api/generations?limit=100 reports total=20, five oldest ids answer 404, newest answers 200, generations/ holds exactly 20 .wav and no .part files.

Settings: PUT /api/settings on blur persisted rate 1.5 / volume 0.85 and GET after reload returned them (server-side app_settings, so it survives a restart). Closes T3.1's "live persistence unverified" note.

Suites: 93 Vitest, ESLint, tsc --noEmit, Prettier (CRLF via npx prettier --check . --end-of-line=crlf), live vite build; 196 pytest unit + 16 pytest integration (real en_US-lessac-medium) run before the change, unchanged by it; git diff --check clean.

Decisions

  • No production code changed. VITE_API_MODE already defaults to live (api/index.ts; nothing sets it), putSettings on control blur shipped in T3.1, and eviction already bounds rows at TTS_HISTORY_LIMIT and removes the WAV (T1.5/T1.6). The task's deliverable is therefore the verification record; frontend/src/api/index.ts, frontend/src/state/appContext.tsx, and src/tts/history/dal.py are untouched because no gap was found.
  • Mock parity — accepted and documented (closes T1.4's follow-up): the mock keeps its simplified cue builder and unbounded in-memory history as mock-only behaviour; live tts.subtitles.cues and DAL eviction are binding, and mock.ts is not a T4.1-owned file.
  • Observation for T5.2: words whose phonemes do not reconcile are zero-width aligned=false entries, so the highlight is empty while they are spoken (fixture produced 2 unaligned words). This is the FR-05 honest-degradation path and belongs in KNOWN_LIMITATIONS.md, not a bug list.

Full notes, including the Windows Vite/Prettier invocation details, are in docs/TASKS.md → Notes → T4.1. Tracker status is Doing until this PR is merged.

@prateekchaplot
prateekchaplot merged commit 898deff into main Nov 23, 2026
5 checks passed
@prateekchaplot
prateekchaplot deleted the arch/tts/t4.1 branch November 23, 2026 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant