refactor: Remove the test-only Shutdown source result - #198
Open
beekld wants to merge 1 commit into
Open
Conversation
beekld
marked this pull request as ready for review
August 28, 2026 22:33
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.
Summary
FDv2SourceResult::Shutdownwas produced only by the orchestrator's unit tests, which used it as a shortcut to stop a run. No real data source emits it. In production a run ends through the broadcast shutdown channel or by exhausting every source.This removes the variant and reworks the affected tests to end through the real shutdown channel, so they exercise how the orchestrator actually terminates rather than a path that cannot occur. The diff is large but mostly mechanical. The bulk is updating the orchestrator test call sites to the reworked mock.
This also fixes CI on #193, whose narrowing of the FDv2 dead-code suppression exposes the variant this removes.
Note
Overview
Removes
FDv2SourceResult::Shutdownand the orchestrator branch that treated it as an early exit. Production runs already stop via the broadcast shutdown channel or when every synchronizer is blocked.FDv2 data-system unit tests are reworked so scripted mocks end runs the same way:
MockSynchronizerswaps the oldhangflag for an optional shutdown sender (signal when the script ends, otherwise idle for timer tests),sync_factoryfolds in the formerfdv1_factoryvia anis_fdv1_fallbackflag, and exhausted initializer scripts default toInterruptedinstead ofShutdown.Most of the diff is mechanical test call-site updates; runtime behavior for real sources is unchanged aside from dropping an unreachable enum variant.
Reviewed by Cursor Bugbot for commit 8ff2c82. Bugbot is set up for automated code reviews on this repo. Configure here.