Skip to content

Fix 3 more flaky timing-based ReDoS regression tests - #806

Merged
squid-protocol merged 1 commit into
mainfrom
fix/timing-based-redos-regression-flakiness
Jul 30, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/timing-based-redos-regression-flakiness

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

Test plan

  • All 3 tests pass locally
  • ruff format / ruff_audit.py --ci / mypy_audit.py --ci clean
  • Full test_language_standards_strict.py suite (2532 tests) — in progress, will confirm before merge
  • CI green

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]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 78bd26a into main Jul 30, 2026
27 checks passed
@squid-protocol
squid-protocol deleted the fix/timing-based-redos-regression-flakiness branch July 30, 2026 20:53
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