Skip to content

fix: Park a synchronizer that reports Off or closes its results - #500

Open
beekld wants to merge 2 commits into
bklimt/SDK-2986/fdv1-fallback-default-ttlfrom
bklimt/SDK-3425/synchronizer-off-result
Open

beekld wants to merge 2 commits into
bklimt/SDK-2986/fdv1-fallback-default-ttlfrom
bklimt/SDK-3425/synchronizer-off-result

Conversation

@beekld

@beekld beekld commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since #489, the data system has silently ignored a synchronizer result with State: Off. The result's error was dropped, the status didn't change, and the data system kept waiting on that synchronizer. A synchronizer isn't supposed to report Off, but State is a public field, and custom synchronizers can set it.

This PR treats an Off result as an unexpected failure. The data system reports Interrupted with the result's error and parks the synchronizer.

It also changes how the data system handles a synchronizer that closes its result channel on its own. That used to count as a fallback, which with a single synchronizer restarted it at once with no delay. A synchronizer that kept ending its results could then restart in a tight loop. The data system now treats this as an unexpected failure too, and parks the synchronizer.


Note

Overview
Fixes FDv2 synchronizer handling for two invalid behaviors that could leave the client stuck or spinning.

State: Off from a synchronizer is no longer ignored. The data system now surfaces Interrupted with the result’s error, marks the outcome as an unexpected failure, and parks the synchronizer (or restarts from the first synchronizer if the SDK key changed mid-run).

When a synchronizer closes its own result channel, the loop no longer treats that as a normal fallback (which could restart a lone synchronizer immediately in a tight loop). It reports Interrupted with a fixed unknown error, then parks or restarts the same way as other unexpected failures.

Tests assert both paths: status/error reporting and that the primary synchronizer does not run again while parked.

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

@beekld
beekld added this pull request to stack #503 November 2, 2026 21:04
@beekld
beekld marked this pull request as ready for review November 2, 2026 21:05
@beekld
beekld requested a review from a team as a code owner November 2, 2026 21:05

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

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

Fix All in Cursor

❌ 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 193489d. Configure here.

Comment thread internal/datasystem/fdv2_datasystem.go Resolved
@beekld
beekld force-pushed the bklimt/SDK-3425/synchronizer-off-result branch from 7f8c484 to ee27cca Compare November 2, 2026 21:59
@beekld
beekld force-pushed the bklimt/SDK-3425/synchronizer-off-result branch from ee27cca to 6b4d9a8 Compare November 3, 2026 00:05
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.

1 participant