<#3610 refactor: Handle state increment logic for ...
# meltano-repo-activity
g
#3610 refactor: Handle state increment logic for state partitioning keys in state manager helper Pull request opened by edgarrmondragon SSIA Summary by Sourcery Refactor stream state management to encapsulate sort handling inside StreamStateManager and lazy‑initialize it from Stream, while updating tests to cover the new behavior. Enhancements: • Make StreamStateManager lazily initialized via a Stream.state_manager property and wire all stream state operations through it. • Extend StreamStateManager to accept is_sorted and check_sorted flags and internally determine how to handle incremental state updates, including for partitioned state. • Simplify StreamStateManager construction by making tap_name optional and removing the requirement to pass sort flags to increment_state. Tests: • Update existing stream state manager tests to reflect the new constructor and usage pattern. • Add tests that verify increment_state behavior for unsorted streams, non-comparable updates, and invalid sort order raising InvalidStreamSortException. meltano/sdk