Test constant samples in compare instead of skipping them - #4881
Merged
Conversation
The compare plugin skipped the statistical test whenever either the baseline or the current sample had zero variance, reporting "No variability" and exporting isSignificant = 0. In a WebPageReplay lab the most deterministic metrics are constant within a session, so the guard suppressed exactly the clearest possible regressions: every run shifting cleanly from 303 ms to 310 ms was never tested, while noisy metrics always were. The more stable the lab, the blinder the test. Mann-Whitney handles constant samples fine (complete separation gives p around 1e-10), so only truly identical datasets are short-circuited now, which also keeps Wilcoxon away from its all-zero-differences degenerate case. Also fixes the compare CLI option definitions: the Mann-Whitney method choice was misspelled as symptotic so the only non-default method crashed scipy while the correct spelling was not listed, three choices carried leading spaces and one describe key was misspelled so its help text never rendered. The stale choices shown in docs config.md regenerate from --help-all at release. Co-authored-by: Claude Fable 5 noreply@anthropic.com
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.
The compare plugin skipped the statistical test whenever either the baseline or the current sample had zero variance, reporting "No variability" and exporting isSignificant = 0. In a WebPageReplay lab the most deterministic metrics are constant within a session, so the guard suppressed exactly the clearest possible regressions: every run shifting cleanly from 303 ms to 310 ms was never tested, while noisy metrics always were. The more stable the lab, the blinder the test. Mann-Whitney handles constant samples fine (complete separation gives p around 1e-10), so only truly identical datasets are short-circuited now, which also keeps Wilcoxon away from its all-zero-differences degenerate case.
Also fixes the compare CLI option definitions: the Mann-Whitney method choice was misspelled as symptotic so the only non-default method crashed scipy while the correct spelling was not listed, three choices carried leading spaces and one describe key was misspelled so its help text never rendered. The stale choices shown in docs config.md regenerate from --help-all at release.
Co-authored-by: Claude Fable 5 noreply@anthropic.com