"""Bot-detection challenges are handed to the user, never attempted. Eric screenshotted the case on 2026-08-04: TikTok showing "Play the audio and enter the code you hear" over a logged-out feed, while the run underneath burned its budget clicking at a page it could never get past. These come in several shapes (audio, press-and-hold, slider/puzzle, image grid) and they share one property: an agent cannot honestly clear any of them. It cannot hear the clip, and a press-and-hold against a behavioural detector is a coin flip that reports success either way, which is precisely the false-success class the rest of this suite exists to prevent. So the rule is refuse and escalate. What these tests protect is (a) that the common shapes are detected at all, and (b) that ordinary pages are NOT, because a detector that cries captcha on a checkout form interrupts the user for nothing. """ from backend.apps.agents.browser import detect_captcha as dc def test_the_tiktok_audio_challenge_from_the_screenshot(): kind = dc.captcha_kind("Play the audio and enter the code you hear") assert kind and "audio" in kind, kind def test_the_interaction_shaped_challenges_are_each_named(): """The kind is load-bearing: "solve the captcha" tells a user nothing, "it wants you to play a clip and type what you hear" tells them what they are about to do.""" assert "press-and-hold" in (dc.captcha_kind('[3]