fix(flags): retry flag requests on transient network errors#101
Open
marandaneto wants to merge 5 commits into
Open
fix(flags): retry flag requests on transient network errors#101marandaneto wants to merge 5 commits into
marandaneto wants to merge 5 commits into
Conversation
|
Reviews (1): Last reviewed commit: "fix: retry feature flag requests on netw..." | Re-trigger Greptile |
5 tasks
marandaneto
commented
Jun 26, 2026
|
Reviews (2): Last reviewed commit: "Merge branch 'main' into pi-flags-networ..." | Re-trigger Greptile |
turnipdabeets
approved these changes
Jun 26, 2026
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.
💡 Motivation and Context
/flags/?v=2evaluation should tolerate transient network failures, but should not retry HTTP/API responses such as 408, 429, or 5xx.This PR adds bounded retry/backoff only for transient network failures (timeouts, connection resets/lost connections, and EOF-style failures) and keeps HTTP/API status errors terminal.
💚 How did you test it?
See the repo-specific command below.
📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented by pi after a maintainer-directed cross-SDK pass. The chosen policy is transient network-only retry/backoff for
/flags/?v=2; HTTP/API statuses remain non-retryable by design. Connection-refused failures also fail fast where the platform exposes that distinction.Tested with:
dotnet test tests/PostHog.Unity.Tests/PostHog.Unity.Tests.csproj --filter NetworkClientTests