Skip to content

fix: Keep polling for flag updates after the first poll response - #646

Open
kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-3656/fdv1-polling-after-200
Open

kinyoklion wants to merge 1 commit into
mainfrom
rlamb/sdk-3656/fdv1-polling-after-200

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

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.

HandlePollResult now calls StartPollingTimer() 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.

@kinyoklion
kinyoklion marked this pull request as ready for review November 17, 2026 22:33
@kinyoklion
kinyoklion requested a review from a team as a code owner November 17, 2026 22:33
@cursor cursor Bot added the risk:low label Nov 17, 2026

@cursor cursor Bot 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.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Dry-Run PR Approver

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant