refactor(internal): consolidate FDv2 dependency tracker into internal/toposort - #404
Merged
Merged
Conversation
kinyoklion
marked this pull request as draft
July 7, 2026 21:27
This was referenced Jul 7, 2026
Draft
kinyoklion
marked this pull request as ready for review
July 8, 2026 16:49
keelerm84
approved these changes
Jul 8, 2026
tanderson-ld
added a commit
that referenced
this pull request
Aug 18, 2026
Reviewers rejected exposing extended-regime timing knobs on the SDK's public builders -- those would put a test-harness bypass in the customer-facing surface. Delete every public addition while preserving the RETRY-spec behavior. Removed: - Builder.Internal() accessors and *Internal types - DefaultExtendedInitialReconnectDelay, DefaultRetryResetInterval, DefaultExtendedInitialPollInterval public constants - testhelpers/datasourcetest/ package - Servicedef ExtendedInitialDelayMS / ResetThresholdMS fields (matches sdk-test-harness PR #404 refactor) Kept: full RETRY behavior (401/403/other-4xx no longer terminal; extended regime engages), all defaults unchanged (5-min extended-initial, 60s activeSince reset). Contract test capabilities retry-conformance-fdv1-streaming and retry-conformance-fdv1-polling remain declared. Added: defaultExtendedInitialPollDelay fallback in internal/datasource so removing the public constant doesn't silently drop the 5-min default. Streaming already had the equivalent fallback pre-refactor. E2E tests exercising 401 retry now use a test-local ComponentConfigurer (streaming) or default polling config (polling) instead of the deleted datasourcetest helpers. Also tidied polling_strategy_test.go to reference the new fallback constant instead of scattered 5*time.Minute literals where semantics matched. Validated: full RETRY-conformance suite (13 leaf tests, 9 streaming + 4 polling) passed against the sdk-test-harness PR #404 branch with -enable-long-running-tests at real production 5-minute extended-regime timing.
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.
Moves the FDv2 dependency tracker from
internal/datasystem/data_model_dependencies.gointointernal/toposortas an exported (internal-only)DependencyTracker, next to theVertex/Neighbors/GetNeighborsprimitives it is built on. The FDv2 store switches to the new location; behavior is unchanged and the existing tests move with it.The tracker is about to gain a second consumer: the flag-override layer needs the same dependency fan-out to compute which flags are affected when override entries change, and it should not reach into
internal/datasystemfor it. The near-identical unexported copy ininternal/datasource(FDv1) is deliberately left alone; it goes away with FDv1.No public API or behavior change.
SDK-2655
Note
Low Risk
Pure internal move with exported methods mirroring the old unexported API; FDv1 duplicate remains separate and tests were relocated unchanged.
Overview
Moves the FDv2 dependency tracker out of
internal/datasystemintointernal/toposortas an exportedDependencyTracker(withNewDependencyTracker,UpdateDependenciesFrom,Reset, andAddAffectedItems), colocated with the existingVertex/Neighbors/GetNeighborshelpers.internal/datasystem/data_model_dependencies.gois deleted; the FDv2Storenow holds*toposort.DependencyTrackerand calls the new exported API—flag change fan-out behavior is unchanged.Existing dependency-tracker tests move to
internal/toposort/dependency_tracker_test.go(toposort_testpackage) with the same scenarios; a smallfullDataSetToMaphelper is added there for sort tests. The parallel unexported tracker ininternal/datasource(FDv1) is intentionally untouched.Reviewed by Cursor Bugbot for commit 6d6f30a. Bugbot is set up for automated code reviews on this repo. Configure here.