Skip to content

feat: Request and decode gzip-compressed polling responses - #297

Open
keelerm84 wants to merge 1 commit into
mainfrom
mk/SDK-3598/polling-gzip
Open

keelerm84 wants to merge 1 commit into
mainfrom
mk/SDK-3598/polling-gzip

Conversation

@keelerm84

@keelerm84 keelerm84 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Flag requests now send Accept-Encoding: gzip, and the SDK decodes gzip-compressed responses. Uncompressed responses still work.

  • GuzzleFeatureRequester sets Guzzle's decode_content to gzip. Guzzle adds the request header and decodes the body with both the curl handler and the stream handler.
  • The optional cache middleware stores the decoded body, so a cached replay and a 304 revalidation both return plain JSON.
  • New WireMock-backed tests cover the request header, a gzip body, a plain body, a cached replay and a 304 revalidation. WireMock compresses plain stubs on its own when the client accepts gzip, so the plain-body stub sets Content-Encoding: identity to keep the bytes uncompressed.
  • The contract-test service declares the polling-gzip capability.

Opened from termag


Note

Overview
The polling HTTP client in GuzzleFeatureRequester now sets Guzzle’s decode_content to gzip, so flag/segment polls advertise Accept-Encoding: gzip and transparently decode gzip response bodies while still handling uncompressed JSON.

The contract test harness advertises a new polling-gzip capability. WireMock-backed integration tests verify the request header, gzip and plain responses, decoded bodies served from cache on replay, and correct behavior after a 304 revalidation with If-None-Match.

Reviewed by Cursor Bugbot for commit 2f84eaa. Bugbot is set up for automated code reviews on this repo. Configure here.

@keelerm84
keelerm84 marked this pull request as ready for review November 13, 2026 21:38
@keelerm84
keelerm84 requested a review from a team as a code owner November 13, 2026 21:38
@cursor cursor Bot added the risk:low label Nov 13, 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.

Risk: low.

Automated risk review (dry run): Low

This PR would be automatically approved.

Why: GuzzleFeatureRequester.php adds a one-line Guzzle decode_content gzip option, with new WireMock coverage in GuzzleFeatureRequesterGzipTest.php and a polling-gzip contract-test capability in TestService.php.

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