Draft
Conversation
gasperzgonec
commented
Feb 24, 2026
Removed extraction time direction, as that's not needed because we get both times provided to us.
and fixed tests that were testing this. Also added multiple tests, that do different actions in order, to verify that the state stays as it should.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the Enhanced Control Protocol V2 for the ADaaS SDK. It introduces a time-value resolution system where the platform sends
TimeValueobjects describing extraction time boundaries, and the SDK resolves them into concrete ISO 8601 timestamps for the developer. The SDK also tracks extraction boundaries (workers_oldest/workers_newest) in persisted state, enabling windowed and incremental extraction scenarios.Old Code (Deprecated)
New Code (Recommended)
How It Works
extraction_start_timeandextraction_end_timeasTimeValueobjects (e.g.{ type: "workers_newest" }or{ type: "absolute", value: "2026-01-01T00:00:00Z" })workers_oldest,workers_newest) and writes concrete ISO 8601 timestamps toextraction_startandextraction_endextraction_start/extraction_end— no awareness ofTimeValueneededworkers_oldest/workers_newestboundaries on extraction completionSupported TimeValue Types
absolutenowunboundedundefined— no bound, extract all availableworkers_oldestworkers_newestworkers_oldest_minus_window7d,2m) fromworkers_oldestworkers_newest_plus_windowworkers_newestScenario: Initial Import — periodic sync from last known point
Scenario: Normal Import — periodic sync from last known point
Scenario: POC Import — from a specific date to now
Scenario: Computer Import — historical with window
Scenario: Reconciliation — specific date range
What's New
TimeValueTypeenum +TimeValueinterface: New types for platform-to-SDK time communication (7 time value types)EventContext: Addedextraction_start_time/extraction_end_time(rawTimeValuefrom platform), andextraction_start/extraction_end(resolved ISO 8601 strings for developers). Deprecatedextract_from,reset_extract_from, and updatedreset_extractiondeprecation message.SdkState: Addedworkers_oldest,workers_newest— SDK manages these automaticallysrc/common/time-value-resolver.tswith duration parsing (7d,2m,1y) and time value resolution against worker stateworkers_oldest/workers_neweston extraction completion based on directionConnected Issues
Checklist
npm run testOR no tests needed.npm run test:backwards-compatibility.npm run lint.