feat(tts): Grok stability + security hygiene - #4
Merged
Merged
Conversation
… tests - Document single source of truth (tts_providers vs registry adapter) - SECURITY.md: never commit XAI_API_KEY; env-only + redacted check-runtime - transcripts.py docstring: EXAMPLE fictitious E.164s only - Expand Grok provider tests (HTTP 500, empty body, health missing key, default eve) - check-runtime / radar manual ops notes
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Same as hygiene pass for Grok TTS on Bartok fork.
Note
Low Risk
Docs, comments, docstring examples, and mocked unit tests only; no production TTS or auth logic changes in the diff.
Overview
Hygiene pass for Grok TTS: env-only API keys, clearer ops docs, and safer examples—no change to live TTS HTTP behavior in this diff.
SECURITY.md adds a Secrets & API keys (env-only) section: never commit real keys, use
.env/ placeholders, fail closed without hard-coded secrets, and redact values in health/runtime checks (with a pointer to Grok TTS docs).docs/features/grok-tts.md documents
tts_providers/grok_provider.pyas the single source of truth vs the thin registry adapter, adds a short enable/quick-start flow (check-runtime.sh, mocked pytest), clarifies missing-key test runs, and documents optionalvoice_tech_radar.pyusage.scripts/check-runtime.sh comments state it always exits 0 so CI/boot can run without keys; unset
XAI_API_KEYis informational only.routes/transcripts.py replaces real-looking E.164s in the SMS parser docstring with fictitious example numbers and warns against committing real numbers in fixtures.
tests/test_grok_tts_provider.py adds mocked coverage for HTTP 500, empty 200 bodies, health_check without a key, and default
voice_idevewhen voice is omitted.Reviewed by Cursor Bugbot for commit 660e464. Bugbot is set up for automated code reviews on this repo. Configure here.