Interruption Stress Test
Programmatically simulates 10 consecutive voice interruptions to verify the interruption pipeline doesn't degrade under repetition. This test bypasses the microphone and directly invokes the interruption logic.
Test Details
What this test does:
  • Simulates 10 consecutive voice interruptions
  • Each attempt creates a 10-second audio response (20 chunks × 500ms)
  • Interrupts after 100ms (while audio is playing)
  • Executes the full 4-step interruption pipeline
  • Logs state before/after each interruption
4-Step Interruption Pipeline:
  1. Stop all scheduled audio sources (disconnect + stop)
  2. Hard mute output for 200ms (GainNode ramp to 0)
  3. Cancel current response (send response.cancel)
  4. Reset state (assistantAudioPlaying=false, keep hands-free enabled)
Success criteria:
  • All 10 attempts must send cancel
  • All scheduled sources must be stopped
  • assistantAudioPlaying must be false after each attempt
  • handsFreeMode must remain true (never disabled)
  • No degradation across attempts
Note: Open browser DevTools Console (F12) to see detailed [STRESS-TEST] logs showing the exact execution flow for each attempt.