Skip to content

feat: Add the FDv2 data system orchestrator - #190

Open
beekld wants to merge 7 commits into
mainfrom
bklimt/SDK-2753/fdv2-orchestrator
Open

feat: Add the FDv2 data system orchestrator#190
beekld wants to merge 7 commits into
mainfrom
bklimt/SDK-2753/fdv2-orchestrator

Conversation

@beekld

@beekld beekld commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the FDv2 orchestrator, the DataSystem implementation that owns the
in-memory store and keeps it populated. It runs an initializer phase to obtain
a basis, then a synchronizer phase for ongoing changes.

The initializer phase tries each initializer in order until one produces a
basis. The synchronizer phase then runs one synchronizer at a time and rotates
between them on three triggers:

  • A fallback timer advances to the next synchronizer after a sustained
    interruption.
  • A recovery timer returns to the primary synchronizer after the recovery
    interval.
  • A terminal error blocks a synchronizer and advances past it.

Initialization is signaled as complete on the first basis and as failed once
every source is exhausted without one, because the client's initialization path
already resolves to success or failure. Synchronizer status transitions are
logged, with interruptions at info (not repeated while ongoing) and terminal
errors at warn.


Note

Overview
Introduces FDv2DataSystem, the FDv2 DataSystem that owns an in-memory store and keeps it updated through initializer and synchronizer phases.

Initializer phase walks configured initializers until one returns a full basis (ChangeSet), applies it via TransactionalDataStore::apply, and signals init_complete(true) once.

Synchronizer phase runs one synchronizer at a time, passing the latest selector into next, and applies partial/full change sets as they arrive. SourceManager rotates among synchronizer factories: sustained interruption arms a fallback timer to advance to the next source; a recovery timer (when not on the prime) rewinds to the primary; terminal errors block that factory and move on. Shutdown ends the loop without a failure callback if init never completed.

Registers the module in fdv2/mod.rs and removes stale dead_code allowances on ChangeSet.selector and TransactionalDataStore now that the orchestrator consumes them. Adds broad unit/integration-style tests for rotation, timers, init signaling, and store reads.

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

@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 4ea2eb8 to 775e611 Compare August 10, 2026 18:41
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 775e611 to 2fa17de Compare August 10, 2026 18:46
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 2fa17de to a523fa8 Compare August 12, 2026 21:45
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from a523fa8 to 3e77e84 Compare August 12, 2026 22:10
Base automatically changed from bklimt/SDK-2742/fdv2-streaming to main August 13, 2026 21:29
@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from 3e77e84 to f3e5a99 Compare August 13, 2026 21:29
@beekld
beekld marked this pull request as ready for review August 13, 2026 21:35
@beekld
beekld requested a review from a team as a code owner August 13, 2026 21:35

@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 f3e5a99. Configure here.

// Good data clears the fallback countdown.
fallback_at = None;
interrupted_logged = false;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

None changesets treated as real updates

High Severity

Any ChangeSet is treated as a basis, including ChangeSetKind::None from polling 304 and xfer-none. Those payloads carry a None selector, so the live basis is overwritten and init_complete(true) can fire with an empty store. Later next calls then omit basis, forcing full transfers instead of deltas.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f3e5a99. Configure here.

@beekld
beekld force-pushed the bklimt/SDK-2753/fdv2-orchestrator branch from f3e5a99 to 58c2a46 Compare August 14, 2026 20:53
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