Repository navigation
fix: include final windows in endpoint reducers - #2474
Closed
pcbeingused333 wants to merge 2 commits into
Closed
pcbeingused333 wants to merge 2 commits into
pcbeingused333 wants to merge 2 commits into
Conversation
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.
Fixes #2472
The difference, ratio, first, and last reducers stop before the final full window in strict mode and omit trailing truncated windows in non-strict mode. Include the final full window and iterate over all output positions when truncation is allowed. Existing endpoint helpers skip undefined values beyond the available indices.
Add regression coverage for all four reducers, all three anchors, both strict settings, and window sizes from one through larger than the input. Update strict expectations to include the previously missing full window. Regenerate the metroUnemploymentSlope snapshot: each division now includes its final line segment; the snapshot diff is confined to those endpoints.
Testing and validation
The real Vitest suite passes 1370 tests, with 2 skipped and one existing environment-dependent failure in projectionDomainRatioNC. All 55 window transform tests and the updated metroUnemploymentSlope snapshot pass. Prettier passes for both changed JavaScript files.
With the window implementation restored from main (2245188), 24 tests in the window test file and the metroUnemploymentSlope snapshot fail. projectionDomainRatioNC fails with or without this change, so its snapshot is left unchanged.
This change was generated with assistance from OpenAI Codex.