Add recording health monitoring and teardown safeguards#64
Merged
Conversation
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.
Motivation
VoiceClienthas stopped recording and avoid silent failures.Description
TRANSCRIBE_RECORDING_FAILURE_GRACE_INTERVALSconfig to tolerate short blips before escalation.transcription_live_loop, whenvcis connected butvc.recordingis false incrementsession.recording_failure_count, emit a warning includingguild_id,voice_state,recording_failure_count, andqueue_depth, and apply the grace-period retry logic before proceeding to teardown.session.recording_failure_countexceedsTRANSCRIBE_MAX_FAILURES, callteardown_transcription_session_for_recording_failure(...)with a clear failure reason containing consecutive failure count and queue depth.session.recording_failure_countto0and log a recovery event whenever recording resumes/capture succeeds.teardown_transcription_session_for_recording_failureto cancel andawaitloop_taskandworker_task(avoiding cancelling the current task), then continue disconnect/notification and remove the session viaremove_transcription_session.Testing
python -m py_compile poopbot.py, which completed without errors.Codex Task