Skip to content

Fix upstream transport fallback and connection timing - #25

Merged
gitcommit90 merged 2 commits into
mainfrom
fix/http-transport-response-locks
Aug 13, 2026
Merged

Fix upstream transport fallback and connection timing#25
gitcommit90 merged 2 commits into
mainfrom
fix/http-transport-response-locks

Conversation

@gitcommit90

@gitcommit90 gitcommit90 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • treat proxy-generated 502/503/504 connection failures as retryable transport errors without locking accounts
  • preserve nested socket causes in diagnostics
  • allow five seconds per resolved address before connection fallback

Validation

  • npm test (324 passing)
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added automatic network address-family selection with a five-second connection attempt timeout.
    • Added retry and fallback handling for proxy-related HTTP 502, 503, and 504 connection failures.
    • Improved reporting of nested transport and connection errors.
  • Bug Fixes

    • Prevented temporary transport failures from unnecessarily triggering provider cooldowns.
    • Improved recovery for failed requests, including same-provider OAuth and proxy connection resets.
  • Chores

    • Updated the package version to 0.5.12.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d6d13235-c4d3-4199-8be2-cf21d22735fc

📥 Commits

Reviewing files that changed from the base of the PR and between 1428e3e and 996c6ca.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • CHANGELOG.md
  • package.json
  • src/cli/index.js
  • src/lib/network.js
  • src/lib/router.js
  • src/main.js
  • tests/network.test.js
  • tests/router-fallback.test.js

📝 Walkthrough

Walkthrough

Version 0.5.12 configures outbound network defaults at startup and uses a five-second per-address timeout. Router failure handling now recognizes proxy transport failures, traverses nested errors, and supports retry and fallback behavior.

Changes

Network defaults and transport resilience

Layer / File(s) Summary
Network defaults and startup wiring
src/lib/network.js, src/cli/index.js, src/main.js, tests/network.test.js, package.json, CHANGELOG.md
Adds configureNetworkDefaults() and ADDRESS_ATTEMPT_TIMEOUT_MS, invokes configuration during startup, tests the settings, and records version 0.5.12.
Transport failure classification and fallback
src/lib/router.js, tests/router-fallback.test.js
Classifies matching 502–504 responses as transport failures, traverses nested causes and error arrays, propagates transport flags, and tests proxy-reset retries and aggregate socket-error logging.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/http-transport-response-locks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitcommit90
gitcommit90 merged commit 1aa5687 into main Aug 13, 2026
1 of 2 checks passed
@gitcommit90
gitcommit90 deleted the fix/http-transport-response-locks branch August 13, 2026 22:06
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