Repository navigation
feat: port client-side streaming retry contract tests to v3 - #475
Conversation
…ts (#395) Forward-port of v2 #395 to v3. On v3 the tests run against the FDv2 streaming synchronizer, following the same mapping v3 already uses for the server-side retry tests. JS-based SDKs no longer get initial data from a polling data source; the stream is the only data source. The client-event-source-http-errors capability already exists on v3, so only the tests and their registration are added. (cherry picked from commit 5e512a0) SDK-3211
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 861b1d0. Configure here.
|
|
||
| // Check that the client got the new data from the second stream | ||
| pollUntilFlagValueUpdated(t, client, flagKey, context, expectedValueV1, expectedValueV2, ldvalue.Null()) | ||
| }) |
There was a problem hiding this comment.
Roku handshake breaks retry sequencing
Medium Severity
These retry cases drive a SequentialHandler and treat every request to the mock streaming endpoint as one stream attempt. Roku still sends a short-lived POST /handshake before the SSE connection, so that extra request consumes a handler slot and shifts later responses. Nearby connection-lifecycle coverage already skips this handshake.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 861b1d0. Configure here.
🤖 I have created a release *beep* *boop* --- ## [3.2.0-alpha.11](v3.2.0-alpha.10...v3.2.0-alpha.11) (2026-10-08) ### Features * adding client side bootstrap tests ([#462](#462)) ([9c1810d](9c1810d)) * Port client-side prerequisite cycle detection tests to v3 ([#473](#473)) ([7e65a58](7e65a58)) * port client-side streaming retry contract tests to v3 ([#475](#475)) ([f968442](f968442)) ### Bug Fixes * Verify all-items reads for empty and single-item collections ([#466](#466)) ([489a780](489a780)) * Verify SDKs read all three persistent-store tombstone shapes ([#484](#484)) ([a9a0696](a9a0696)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Overview** > **Release 3.2.0-alpha.11** — automated version bump only: `.release-please-manifest.json`, `versionString` in `main.go`, and a new `CHANGELOG.md` section. > > The changelog documents what ships in this alpha: **new contract coverage** for client-side bootstrap, prerequisite cycle detection (ported to v3), and streaming retry behavior; plus **harness fixes** for all-items reads on empty/single-item persistent-store collections and for all three persistent-store tombstone shapes. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1a2073d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>


Forward-ports v2 #395 (client-side streaming retry and error-recovery contract tests) to v3. SDK-3211.
Mapping to v3
v3 has no FDv1 streaming data source, so the tests run against the FDv2 streaming synchronizer. This is the same mapping v3 already uses for the server-side retry tests in
server_side_stream_retry.go. The stream endpoint is the SDK's only synchronizer, with no polling initializer (as inCommonStreamingTests.setupDataSystems). The flag key isflag-keybecause v3'smakeSDKDataWithFlagfixes it. Timeouts andclient-event-source-http-errorsgating are unchanged. v3 already had that capability and its docs, so neither is duplicated.Case-by-case check against FDv2 semantics
Every #395 case was ported. None of them expects a retry after an error that FDv2 treats as permanent, so no assertion needed to change.
common_tests_stream_fdv2.go.One adaptation: in v2, the initial-connect tests had JS SDKs poll for dataV1 first, and dataV2 on the stream proved that the data came from the stream. On v3 there is no polling initializer, so the SDK starts with no flags. Seeing dataV2 still proves the data came from the stream.
Not ported: v2 #404
#404 (RETRY-conformance tests and the
retry-conformance-fdv1-streaming/retry-conformance-fdv1-pollingcapabilities) is intentionally not ported: no tests, no capability constants, no docs, no gating. It targets FDv1 data-source code paths, which don't exist in v3. Its v3 predecessor #401 was closed for that reason. Advertising the capabilities with no tests behind them would be misleading.Verification
go build ./...,go vet ./...,go test ./...: passmake lint(golangci-lint v2.11.1): 0 issuesNote
Overview
Adds a retry behavior sub-suite to client-side streaming tests by wiring
doClientSideStreamRetryTestsintodoClientSideStreamTestsand introducingclient_side_stream_retry.go.The new contract tests exercise FDv2 streaming as the only data synchronizer (no polling initializer): reconnect after a closed stream; retries after I/O or recoverable HTTP statuses (400, 408, 429, 500, 503) on first connect and on reconnect, with
InitCanFailwhere client SDKs may finish init before background retries succeed; and no further connections after unrecoverable statuses (401, 403, 405) whenclient-event-source-http-errorsis advertised. Mock endpoints use sequential handlers and connection counting, with client-appropriate timeouts.Reviewed by Cursor Bugbot for commit 861b1d0. Bugbot is set up for automated code reviews on this repo. Configure here.