fix: enable upstream connect retry by default#114
Merged
Conversation
Tier 2.7 of the network-robustness audit. The single-retry-on-transient- failure logic (already implemented in soth-mitm) was gated behind upstream_retry_on_failure, which defaulted to false — so the knob was effectively dead and a single transient connect failure during a hotspot handoff or gateway blip surfaced straight to the user as a 502. Flip the default to true in both the CLI-generated config (cli_config ForwardProxyConfig) and the soth-proxy ProxyConfig fallback. The retry fires only on transient errors (refused / unreachable / reset), never on timeouts, and is bounded by the existing connect deadline — so it absorbs handoff blips without masking a genuinely stuck upstream. Users can still set it false explicitly. soth-proxy + soth-cli config tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follow-up from review: since upstream_retry_on_failure is now on by default, document it (and upstream_retry_delay) in the example config so users can discover the behavior and disable it if they want. No code change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tier 2.7 of the network-robustness audit. The single-retry-on-transient-failure logic (already implemented in soth-mitm) was gated behind
upstream_retry_on_failure, which defaulted to false — so the knob was effectively dead and a single transient connect failure during a hotspot handoff or gateway blip surfaced straight to the user as a 502.Flips the default to
truein both places:cli_configForwardProxyConfig)soth-proxyProxyConfigfallbackThe retry fires only on transient errors (refused / unreachable / reset), never on timeouts, and is bounded by the existing connect deadline — so it absorbs handoff blips without masking a genuinely stuck upstream. Users can still set it
falseexplicitly.Testing
soth-proxy (102 lib) + soth-cli config tests pass. Platform-agnostic config change.
🤖 Generated with Claude Code