Repository navigation
fix: Keep polling for flag updates after the first poll response - #646
Open
kinyoklion wants to merge 1 commit into
Open
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
Generated-by: termag
There was a problem hiding this comment.
Automated risk review (dry run): Low
This PR would be automatically approved.
Why: It adds three StartPollingTimer() calls in the server SDK FDv1 polling data source after HTTP 200, plus a new unit test covering valid, malformed, and schema-mismatch bodies.
If you disagree with this review, share this PR in #feedback-agent-approvals or submit a changes-requested review explaining why.
Sent by Cursor Approval Agent: Dry-Run PR Approver
This branch has not been deployed
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.


In FDv1 polling mode, the server SDK stopped polling after a 200 response, whether the body held valid data, malformed JSON or JSON that did not match the schema. The SDK then never got later flag changes. Every poll result now schedules the next poll, except an unrecoverable HTTP status.
Testing: Tested on 61711398, before the rebase onto main. New unit tests for the polling data source fail before the change and pass after it. Four harness tests for repeated polls change from fail to pass. The full contract suites, with Beast and with CURL, show no other change.
SDK-3656
Opened from termag
Note
Overview
Fixes a regression where FDv1 polling stopped after the first HTTP 200, so the server SDK never saw later flag updates.
HandlePollResultnow callsStartPollingTimer()on every HTTP 200 path that returns early—valid payload, JSON parse failure, and schema validation failure—matching the existing retry behavior for other recoverable outcomes. Unrecoverable HTTP statuses still stop polling.New gtest coverage spins up a local Beast HTTP server and asserts a second poll happens for valid data, malformed JSON, and schema-mismatch bodies.
Reviewed by Cursor Bugbot for commit 3161c46. Bugbot is set up for automated code reviews on this repo. Configure here.