Skip to content

Linearity tests: shared retrying doubling-ratio helper (Part of #8097) - #8098

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8097-20261108T1153Z
Nov 8, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8097-20261108T1153Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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 exceeds max(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_linear copy)
  • tests/extraction/languages/test_perl_heredoc_imports_6572.py (own _best_of, same ratio check)
  • Absolute wall-clock bounds (different mechanism): 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.py all clear; time_ratchet.py check 0 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

squid-protocol and others added 2 commits November 8, 2026 06:56
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]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 8, 2026 12:07
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 8, 2026 12:10
@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 Nov 8, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 612dd37 into main Nov 8, 2026
62 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8097-20261108T1153Z branch November 8, 2026 12:33
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