Repository navigation
Fix 3 more flaky timing-based ReDoS regression tests - #806
Merged
Merged
Conversation
Same root cause and fix as the earlier flakiness hardening (#800): test_yacc_explicit_casts_redos_immunity, test_groovy_closures_redos_immunity, and test_groovy_spec_exposure_quadratic_blowup_redos_regression each timed a single perf_counter() sample per payload size instead of using the shared _best_of_timing() (min-of-5) helper already used elsewhere in this file -- a lone scheduling hiccup on any one size was indistinguishable from a real regression toward O(n^2). Caught live: test_groovy_spec_exposure_quadratic_blowup_redos_regression failed in CI on macos-latest/3.10 during an unrelated PR (#770), tripping its 0.02s floor by a hair ([...0.0064s, 0.0202s]) under smoke-test runner contention -- not a real regression (confirmed clean locally, unloaded). Swept the other 2 occurrences of the identical single-shot-timing shape proactively rather than patching only the one that failed, matching the approach used for the earlier ratio-based flaky tests. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
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.
Summary
test_groovy_spec_exposure_quadratic_blowup_redos_regressionfailed onsmoke-test (macos-latest, 3.10)during PR Fix #770: scheme's #| |# block comments are now actually stripped as nested blocks #804 (scheme's #| |# nested block comments are never actually stripped as a block (line_exclusive has no cross-line state) #770), tripping its0.02sabsolute floor by a hair ([..., 0.0064s, 0.0202s]) under smoke-test runner contention -- not a real regression (confirmed clean locally, unloaded).perf_counter()sample per payload size, instead of using the shared_best_of_timing()(min-of-5) helper already used by every other ReDoS scaling test in this file. A lone scheduling hiccup on any one size was indistinguishable from a real regression toward O(n^2).test_yacc_explicit_casts_redos_immunity,test_groovy_closures_redos_immunity,test_groovy_spec_exposure_quadratic_blowup_redos_regression) rather than patching only the one that failed, matching the approach already used for the earlierratio > 2.5class of flaky tests.Test plan
ruff format/ruff_audit.py --ci/mypy_audit.py --cicleantest_language_standards_strict.pysuite (2532 tests) — in progress, will confirm before merge