Skip to content

fix(engine): prefer challenge_block over timeout false-hope - #51

Merged
gildesmarais merged 2 commits into
mainfrom
feat/challenge-before-timeout
Aug 28, 2026
Merged

gildesmarais merged 2 commits into
mainfrom
feat/challenge-before-timeout

Conversation

@gildesmarais

Copy link
Copy Markdown
Member

What changed

  • On browser nav/timeout exceptions, re-assess the inspectable page/driver via ChallengeDetector and return challenge_block (no timeout_phase) when unclean.
  • Hard HTTP blocks (blocked_detected without challenge marker) abort remaining strategies; soft challenge markers may still retry.
  • Unit coverage: timeout+challenge → challenge_block; timeout+clean → timeout/work; hard-block attempt count = 1.

Why

Root cause

Knowable challenge pages were still classified as timeout/work after exceptions, burning wall-clock and showing retry false-hope upstream.

Risk

  • Low — classification-only; unknown hangs without challenge markers still time out (honest residual).
  • Soft challenge still spends strategies (existing behavior, intentional).

Validation

  • make check → exit 0
  • make smoke not run (no Docker/API contract surface change beyond error category timing)

When a nav/timeout exception leaves an inspectable challenge page, classify
as challenge_block (no timeout_phase) instead of burning the budget into
timeout/work. Hard HTTP blocks abort remaining strategies; soft challenge
markers may still retry.
Keep ChallengeAssessment as soft/hard retry owner; lean post-exception
inspect skips CDP so hung pages still classify without discarding HTML
signals. Shared unclean disposition + thinner challenge fixtures.
@gildesmarais
gildesmarais merged commit 74ac20f into main Aug 28, 2026
13 checks passed
@gildesmarais
gildesmarais deleted the feat/challenge-before-timeout branch August 28, 2026 22:03
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