Skip to content

fix(tests): widen timing budget on stays_pending / never_quiet fixtures#43

Merged
kwschulz merged 1 commit into
mainfrom
fix/timing-flake-pending-data
May 4, 2026
Merged

fix(tests): widen timing budget on stays_pending / never_quiet fixtures#43
kwschulz merged 1 commit into
mainfrom
fix/timing-flake-pending-data

Conversation

@kwschulz
Copy link
Copy Markdown
Contributor

@kwschulz kwschulz commented May 4, 2026

Summary

  • tests/fixtures/test_browser.json had timeout_s: 0.05 for the two timing-loop cases that assert evaluate.call_count >= 2. The 50ms budget passes in CI's clean Linux container but flakes locally under CPU pressure (a single iteration consumes the whole budget on a busy interpreter), failing with assert 1 >= 2.
  • Surfaced — and shipped past — during the v0.8.1 release. release.py runs the full 1970-test suite locally; the matrix CI's per-job isolation kept it invisible for prior releases. Bumping to timeout_s: 0.5 gives 10× headroom.
  • This PR exists because I framed the failure as "pre-existing" during v0.8.1 and shipped through it. That's the same deferred-fix pattern the v0.8.1 changelog explicitly called out for the per-module coverage rot. Filed it after the fact rather than during the release; better late than later.

Test plan

  • Reproduced the failure locally: pytest -v --no-cov with full 1970-test load → assert 1 >= 2 on stays_pending
  • Applied fix → full suite green: 1970 passed in 107.31s
  • Three concurrent stress runs of TestWaitForPendingData + TestWaitForNetworkQuiescence → all green
  • scripts/ci-local.sh (matrix profile, isolated .venv-ci/) passes
  • Per-module coverage floors satisfied

🤖 Generated with Claude Code

Both ``tests/fixtures/test_browser.json`` cases set ``timeout_s: 0.05``
and assert ``evaluate.call_count >= 2``. The 50ms budget passes in
CI's clean Linux container but flakes locally under CPU pressure: the
loop's first iteration uses the whole budget on an interpreter under
load, exits with call_count == 1, fails ``assert 1 >= 2``.

Surfaced — and shipped past — during the v0.8.1 release.py run, which
ran the full 1970-test suite. CI's per-job context made it invisible
for prior releases; release.py's local full-suite run finally exposed
it. Bumping to 0.5 gives 10× headroom, verified across three
concurrent stress runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kwschulz kwschulz merged commit 03800e9 into main May 4, 2026
6 checks passed
@kwschulz kwschulz deleted the fix/timing-flake-pending-data branch May 4, 2026 01:47
kwschulz added a commit that referenced this pull request May 4, 2026
Bumps version 0.8.1 → 0.8.2 and finalizes the CHANGELOG section for the
test-fixture timing fix that landed on main in PR #43. Cutting a patch
release rather than carrying [Unreleased] forward: the fix surfaced
during the v0.8.1 release flow, was framed as "pre-existing" at the
time, and shipped past — bundling it into a future release would
repeat the deferred-fix pattern v0.8.1's own changelog called out.

Co-authored-by: Ken Schulz <kwschulz@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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