Skip to content

fix(cli): retry transient failures in the pre-flight reachability probe - #58

Merged
nc9 merged 6 commits into
mainfrom
fix/1408-probe-retry
Aug 1, 2026
Merged

nc9 merged 6 commits into
mainfrom
fix/1408-probe-retry

Conversation

@nc9

@nc9 nc9 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The pre-flight probe got exactly one attempt, and its failure hard-aborts the audit before any crawling. A single transient blip therefore discarded a whole run (observed: a 10s timeout while curl reached the same host in 42ms, with three subsequent runs succeeding at byte-identical scores). The crawler itself has retried with exponential backoff since forever; only this check did not.

  • retries up to 3 attempts with short exponential backoff
  • retries only transient errors (timeout, socket, network, reset, fetch-failed); DNS failures, refused connections and TLS/certificate errors are definitive and still fail on the first attempt
  • a total budget caps the worst case, so a genuinely unreachable host still fails fast

Tests cover the classifier both ways, an end-to-end recovery against a raw TCP listener that hangs up on the first connection and answers the second, and that a dead port returns quickly rather than burning the retry budget.

The probe gets one attempt and a failure hard-aborts before any crawling,
so a single blip discarded a run that succeeded on every retry (observed: a
10s timeout while curl reached the same host in 42ms). The crawler proper
has retried with backoff since forever; only this pre-flight check did not.

Retry up to 3 attempts with a short exponential backoff, but only for errors
that can plausibly succeed on a second try. DNS failures, refused
connections and certificate errors are definitive and still fail on the
first attempt, and a total budget caps the worst case, so genuinely dead
hosts stay fast.

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the fix/1408-probe-retry branch from a34f8ed to dea8a09 Compare August 1, 2026 13:08
@nc9
nc9 merged commit 33b694d into main Aug 1, 2026
13 checks passed
@nc9
nc9 deleted the fix/1408-probe-retry branch August 1, 2026 13:33
nc9 added a commit that referenced this pull request Aug 1, 2026
…etic

* origin/main:
  fix(cli): retry transient failures in the pre-flight reachability probe (#58)
nc9 added a commit that referenced this pull request Aug 1, 2026
* origin/main:
  fix(cli): retry transient failures in the pre-flight reachability probe (#58)
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