Skip to content

tests: retry the timing measurement in test_catches_the_3205_pattern (Part of #5166) - #5374

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5166-redos-3205-flake
Oct 17, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5166-redos-3205-flake

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Part of #5166.

Change

test_catches_the_3205_pattern measured the pre-fix EXEC\s+CICS.*?END-EXEC\. pattern once. A noisy measurement (a 40k-char timing near the 0.25 s threshold, or a growth ratio) could miss the offender. The test now takes up to 3 measurements and uses the first offending verdict. Assertions (offender; unit starts with EXEC CICS) are unchanged; measure() and its thresholds are untouched. Noise only adds time, so a retry cannot turn a clean (linear) pattern into an offender.

Class table (timing-sensitive single-shot measurement in the ReDoS sweep tests)

Member Status Evidence
test_catches_the_3205_pattern handled (this PR): retry up to 3 stress run, 10 passed
test_catches_a_mild_quadratic_by_growth not changed: same one-shot shape, did not fail in the stress run, skipped on Windows see Sibling gaps
test_bounded_heavy_linear_pattern_is_not_an_offender, test_match_is_measured_at_position_zero_only out of scope: assert NOT offender, noise only lowers a growth, so they cannot flake this way reasoning above

Evidence

Not reproduced locally: 15 measurements under 2x CPU oversubscription all passed (the sweep times on thread CPU time). Idle, the EXEC CICS payload at 40k chars takes 0.41 s vs the 0.25 s threshold. The retry is a defensive fix for the CI-only flake, not a verified root cause.

Gates

pytest on the file (10 passed), pr_gates.py --fast 6/6. Tests only; no golden bless.

Sibling gaps

  • test_catches_a_mild_quadratic_by_growth: same single-measurement shape; not in this PR (no observed flake, would need its own evidence). Source: tests/cobol_mainframe/test_tool_regex_redos.py.

Remaining slices

None.

Lessons for agents

measure() times on thread_time, so local CPU contention does not reproduce this flake; the margin over SLOW_S is only ~1.7x on an idle box.

🤖 Generated with Claude Code

…(Part of #5166)

Noise only lowers a measured growth, so up to 3 measurements of the same
pattern keep the assertion and coverage unchanged but stop a noisy
runner from failing it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 17, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 17, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 17, 2026 21:50
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 17, 2026 21:50
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit a453fc7 into main Oct 17, 2026
45 checks passed
@squid-protocol
squid-protocol deleted the churn/5166-redos-3205-flake branch October 17, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant