Skip to content

Test constant samples in compare instead of skipping them - #4881

Merged
soulgalore merged 1 commit into
mainfrom
fix-compare-no-variability
Jul 28, 2026
Merged

Test constant samples in compare instead of skipping them#4881
soulgalore merged 1 commit into
mainfrom
fix-compare-no-variability

Conversation

@soulgalore

Copy link
Copy Markdown
Member

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

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
@soulgalore
soulgalore merged commit ed85855 into main Jul 28, 2026
8 checks passed
@soulgalore
soulgalore deleted the fix-compare-no-variability branch July 28, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant