Skip to content

JSCO-74: Add per-request DNS record selection and RFC-aligned connection-error retry handling#23

Merged
thejcfactor merged 1 commit into
mainfrom
JSCO-74
Jun 24, 2026
Merged

JSCO-74: Add per-request DNS record selection and RFC-aligned connection-error retry handling#23
thejcfactor merged 1 commit into
mainfrom
JSCO-74

Conversation

@thejcfactor

Copy link
Copy Markdown
Collaborator

Changes

  • Added per-request random A/AAAA record selection; requests now connect to the resolved IP while keeping the hostname for TLS SNI and the Host header.
  • Replaced the connection-error deny-list with an allowlist that retries only DNS and TCP-dial failures.
  • Fixed TLS handshake/certificate errors being retried; they now fail fast
  • Wrapped DNS-resolution failures (EAI_AGAIN, ENOTFOUND, empty result) as retriable connection errors.
  • Changed request log lines to show the resolved connect IP instead of the hostname.
  • Added unit tests for host selection, DNS-failure wrapping, and retry classification.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread lib/errorhandler.ts
…ion-error retry handling

Changes
--------
* Added per-request random A/AAAA record selection; requests now
  connect to the resolved IP while keeping the hostname for TLS SNI
  and the Host header.
* Replaced the connection-error deny-list with an allowlist that
  retries only DNS and TCP-dial failures.
* Fixed TLS handshake/certificate errors being retried; they now
  fail fast
* Wrapped DNS-resolution failures (EAI_AGAIN, ENOTFOUND, empty
  result) as retriable connection errors.
* Changed request log lines to show the resolved connect IP instead
  of the hostname.
* Added unit tests for host selection, DNS-failure wrapping, and
  retry classification.
@thejcfactor thejcfactor merged commit 9c22da0 into main Jun 24, 2026
28 checks passed
@thejcfactor thejcfactor deleted the JSCO-74 branch June 24, 2026 18:38
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.

3 participants