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.
Type of change
Description
This PR fixes a critical windowing issue in changepoint detection that was causing false positives in CI pipelines. The issue occurred when changepoints were detected too early in the data series (e.g., at the 2nd data point) without sufficient context to validate whether they represent actual trend changes or just anomalies.
Problem
Orion uses the hunter tool (EDivisive algorithm) underneath to detect changepoints. For the tool to function properly and identify changes in trends, it requires at least 10 samples. However, the current implementation was concluding changepoints without validating that sufficient data exists before and after the detected changepoint.
Example scenario:
This issue was creating noise in CI pipelines, particularly affecting OVN and other jobs.
Solution
Implemented a windowing validation logic that ensures changepoints are only concluded when there's sufficient context:
Early Changepoint Detection (First 5 Data Points):
--lookback): Expanded by adding 10 days to the original lookback period--lookback-size): Expanded tocurrent_points + 5to ensure at least 5 data points exist before the changepointLate Changepoint Detection (Last 5 Data Points):
Validation Requirements:
Related Tickets & Documents
Checklist before requesting a review
Testing
System Under Test