Skip to content

Cap hypothesis work on PyPy so the PyPy CI leg stops timing out - #750

Open
wbarnha wants to merge 2 commits into
masterfrom
claude/pr-merge-order-4avqmi
Open

Cap hypothesis work on PyPy so the PyPy CI leg stops timing out#750
wbarnha wants to merge 2 commits into
masterfrom
claude/pr-merge-order-4avqmi

Conversation

@wbarnha

@wbarnha wbarnha commented Aug 4, 2026

Copy link
Copy Markdown
Member

The advisory PyPy leg has been running out of wall-clock. On PR #699 it
stalled for 6m17s with no output after the last tests/integration/cli file
and was killed at the 15-minute job cap; the next file to run is
tests/meticulous/assignor/test_copartitioned_assignor.py, whose name never
reached the log, meaning its first test never reported.

That file is four hypothesis property tests at the default 100 examples
each. All of them were skipped on PyPy until #716 removed the PyPy skips,
so PyPy started running them for the first time. Hypothesis executes its
own generation and shrinking in pure Python, which PyPy runs slowly, and the
explicit deadline=4000 measures JIT warm-up rather than the assignor -- once
an example trips it, hypothesis drops into a silent shrinking search that
can burn minutes. For scale, the whole of tests/meticulous is 5.8s on
CPython here, yet PyPy sat in it for over six minutes.

The leg has no headroom to absorb that: on the same base commit master takes
11m51s of the 15-minute budget, and raising the cap (already bumped 10 -> 15
by #716) only defers the problem, so cap the work instead.

Register a "pypy" hypothesis profile in tests/conftest.py -- 20 examples, no
deadline, too_slow health check suppressed -- and load it only when running
on PyPy. CPython legs keep the full-size profile, so property coverage is
unchanged where it is cheap to get.

An explicit deadline= on @settings overrides the active profile (verified),
so the profile alone cannot clear the assignor deadline; TEST_DEADLINE is
made None on PyPy for that reason.

Verified: under a simulated PyPy interpreter the tests resolve to
deadline=None and max_examples=20; tests/meticulous drops from 4.95s to
1.40s under the profile on CPython while the default run is unchanged; full
suite 2217 passed; isort/black/flake8 clean.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017K8xAH8Z3xWKHhNRCG2mg1

The advisory PyPy leg has been running out of wall-clock.  On PR #699 it
stalled for 6m17s with no output after the last tests/integration/cli file
and was killed at the 15-minute job cap; the next file to run is
tests/meticulous/assignor/test_copartitioned_assignor.py, whose name never
reached the log, meaning its first test never reported.

That file is four hypothesis property tests at the default 100 examples
each.  All of them were skipped on PyPy until #716 removed the PyPy skips,
so PyPy started running them for the first time.  Hypothesis executes its
own generation and shrinking in pure Python, which PyPy runs slowly, and the
explicit deadline=4000 measures JIT warm-up rather than the assignor -- once
an example trips it, hypothesis drops into a silent shrinking search that
can burn minutes.  For scale, the whole of tests/meticulous is 5.8s on
CPython here, yet PyPy sat in it for over six minutes.

The leg has no headroom to absorb that: on the same base commit master takes
11m51s of the 15-minute budget, and raising the cap (already bumped 10 -> 15
by #716) only defers the problem, so cap the work instead.

Register a "pypy" hypothesis profile in tests/conftest.py -- 20 examples, no
deadline, too_slow health check suppressed -- and load it only when running
on PyPy.  CPython legs keep the full-size profile, so property coverage is
unchanged where it is cheap to get.

An explicit deadline= on @settings overrides the active profile (verified),
so the profile alone cannot clear the assignor deadline; TEST_DEADLINE is
made None on PyPy for that reason.

Verified: under a simulated PyPy interpreter the tests resolve to
deadline=None and max_examples=20; tests/meticulous drops from 4.95s to
1.40s under the profile on CPython while the default run is unchanged; full
suite 2217 passed; isort/black/flake8 clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017K8xAH8Z3xWKHhNRCG2mg1
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.98%. Comparing base (4acc180) to head (eade8af).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #750      +/-   ##
==========================================
+ Coverage   95.97%   95.98%   +0.01%     
==========================================
  Files         103      103              
  Lines       11072    11072              
  Branches     1191     1191              
==========================================
+ Hits        10626    10628       +2     
+ Misses        352      350       -2     
  Partials       94       94              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants