Repository navigation
Linearity tests: shared retrying doubling-ratio helper (Part of #8097) - #8098
Merged
Merged
Conversation
The Windows 3.11 leg of the nightly matrix failed test_long_unterminated_opener_is_linear on one noisy sample (0.61 s vs a 0.13 s base); the engine scales linearly locally. Four tests carried a copy of a single-shot best-of-3 ratio check. They now share linear_assert.assert_linear (best of 5, up to 3 attempts, fails only if every attempt is superlinear). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
2 of 3 tasks
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.
Part of #8097
Cause
Full Suite Gate run 42476013957 (nightly, main 3c42374): the only failing job was windows-latest / 3.11 part 2/3,
test_cpp_namespace_oneline_member_3772.py::test_long_unterminated_opener_is_linear(0.609 < max(0.133*3.2, 0.5)). Locally the scan is linear (0.044 / 0.061 / 0.097 / 0.170 s at 1x/2x/4x/8x), so this is a noisy runner sample in a single-shot best-of-3 ratio check, not an engine regression. No engine change.Class and fix
Class: doubling-ratio linearity tests built on a copy-pasted single-shot helper. New
tests/extraction/languages/linear_assert.py(assert_linear: best of 5, up to 3 attempts, fails only if every attempt exceedsmax(3.2*small, 0.5)); the cpp, perl-pod-span, perl-pod-imports and import-blank tests use it. A self-test shows a real quadratic still fails.Sibling gaps (same helper, not converted: 5-file cap)
tests/extraction/languages/test_go_raw_string_imports_6572.py(_best_of/_assert_linearcopy)tests/extraction/languages/test_perl_heredoc_imports_6572.py(own_best_of, same ratio check)tests/cobol_mainframe/test_pic_run_lengths_7169.py,test_translator_pic_runs_7169.py(0.5 s),test_csharp_strict.py(5 s).None needs a burned-estate program.
Gates
audit_check.pyall clear;time_ratchet.py check0 over limit; the 4 test files pass from an unrelated cwd (repeated 3x). No parsing change, no golden bless. The Windows leg cannot be reproduced locally; the next nightly confirms.Lessons for agents
A linearity test compares a doubling ratio, so a single noisy sample on a slow Windows runner fails it: retry the measurement and fail only when every attempt is superlinear (use
linear_assert.assert_linear).🤖 Generated with Claude Code