Skip to content

chore: adds TestDataV2 to implement Synchronizer#124

Merged
tanderson-ld merged 11 commits intomainfrom
ta/SDK-1633/test-data-source-synchronizer
Feb 4, 2026
Merged

chore: adds TestDataV2 to implement Synchronizer#124
tanderson-ld merged 11 commits intomainfrom
ta/SDK-1633/test-data-source-synchronizer

Conversation

@tanderson-ld
Copy link
Contributor

@tanderson-ld tanderson-ld commented Feb 2, 2026

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Note

Medium Risk
Touches FDv2 core result handling (FDv2SourceResult lifecycle and FDv2DataSource processing), so incorrect closing/callback behavior could affect all FDv2 synchronizers; changes are mostly additive and covered by new tests.

Overview
Adds TestDataV2, a new test-only FDv2 Synchronizer data source that can emit an initial full ChangeSet and subsequent partial updates/tombstones via update(), delete(), updateStatus(), and optional persistence control (shouldPersist).

To support backpressure/ack semantics, FDv2SourceResult is now Closeable and can carry/combine completion callbacks via withCompletion(), and FDv2DataSource is updated to always try-with-resources close results from initializers/synchronizers. Tests are updated to assert correct versioning, and new unit/integration tests cover TestDataV2 behavior and end-to-end usage with LDClient.

Written by Cursor Bugbot for commit 4f26ccf. This will update automatically on new commits. Configure here.

@tanderson-ld tanderson-ld requested a review from a team as a code owner February 2, 2026 16:10
@tanderson-ld tanderson-ld changed the title chore: update TestData to implement Synchronizer chore: adds TestDataV2 to implement Synchronizer Feb 2, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

case INITIALIZING:
default:
// VALID and INITIALIZING do not map to FDv2 status events (same as DataSourceSynchronizerAdapter)
statusResult = null;
Copy link
Member

@kinyoklion kinyoklion Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For valid do we need to have a "none" changeset push?

…n. (#128)

<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Touches core FDv2 data-source result consumption and introduces new
callback/lifecycle semantics that could affect threading or resource
cleanup if misused; behavior is covered with new integration tests but
remains concurrency-sensitive.
> 
> **Overview**
> Adds **consumption completion reporting** for FDv2 results by making
`FDv2SourceResult` `Closeable`, adding an optional completion callback
plus `withCompletion()`, and updating `FDv2DataSource` to use
try-with-resources when handling initializer/synchronizer results so
callbacks reliably fire.
> 
> Refactors `TestDataV2` to use this mechanism (wrapping results with
per-synchronizer completions, switching its internal queueing to
`IterableAsyncQueue`, and removing the old polling-based
`awaitPropagation` helper), and adds `TestDataV2WithClientTest` to
assert initialization, flag updates/deletes, rule/target behavior,
status updates, and multi-client propagation.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
08f24e2. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@tanderson-ld tanderson-ld merged commit 22e1550 into main Feb 4, 2026
21 checks passed
@tanderson-ld tanderson-ld deleted the ta/SDK-1633/test-data-source-synchronizer branch February 4, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants