Skip to content

fix(output): bound and reject empty LLM feedback text for TTS - #33

Open
Bartok9 wants to merge 1 commit into
Auromix:ros2-humblefrom
Bartok9:aerial/feedback-text-bounds
Open

fix(output): bound and reject empty LLM feedback text for TTS#33
Bartok9 wants to merge 1 commit into
Auromix:ros2-humblefrom
Bartok9:aerial/feedback-text-bounds

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 21, 2026

Copy link
Copy Markdown

Summary

Raw LLM feedback strings were passed straight into AWS Polly. Empty whitespace, non-strings, or multi-thousand-character dumps should not reach TTS. Adds sanitize_feedback_text (strip / empty→None / truncate default 3000) and skips synthesis with output_error when invalid.

Motivation

Fail-closed output path; avoid useless Polly calls and overly long Speech Synthesis requests.

Changes

  • llm_output/llm_output/feedback_text.py
  • wire in llm_audio_output.feedback_for_user_callback
  • offline tests test_feedback_text.py

Verification

cd llm_output && PYTHONPATH=. python3 test/test_feedback_text.py -v

Path-orthogonal to credential helper PR (separate module). AI-assisted; human-reviewed.

Sanitize/truncate feedback before Polly; skip synthesis on empty input.
Pure helper + offline unit tests.
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