8000 ci: measure coverage on Python 3.14 through sys.monitoring and rebalance shards (#421) by rafatahmed · Pull Request #464 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content

ci: measure coverage on Python 3.14 through sys.monitoring and rebalance shards (#421) - #464

Merged
rafatahmed merged 1 commit into
mainfrom
ci/coverage-314-421
Dec 3, 2026
Merged

rafatahmed merged 1 commit into
mainfrom
ci/coverage-314-421

Conversation

@rafatahmed
@rafatahmed rafatahmed commented Dec 3, 2026 •
Copy link
Copy Markdown
Owner

Refs #421

Summary

 Test workflow
-  coverage       Python 3.13, line tracing          6 shards x Linux, Windows
-  compatibility  Python 3.11, 3.12, 3.14            2 shards each
+  coverage       Python 3.14, COVERAGE_CORE=sysmon  4 shards x Linux, Windows
+  compatibility  Python 3.11, 3.12, 3.13            3 shards each
   test (3.11..3.14), phreeqc-live, coverage-gate     names unchanged

18 test jobs become 17. tools/ci_coverage.py now requires 3.14 for coverage shards and their aggregation. The gate stays at exactly 100% of statements and branches; no test or exclusion changes.

Evidence

  • Why: the coverage jobs set the pace. The same 19 test groups, on the same hosted machine each time, six machines (run 47087465126): 3.13 tracing 162-308 s, 3.14 sys.monitoring 59-115 s (2.6-2.75 times faster). Four workers instead of three gained 5% at best, so workers are unchanged. The same work on different machines differed by up to 1.8 times.
  • Gate on 3.14: run 47092644862, full suite with six shards per system (coverage jobs only), passed the unchanged exact gate; slowest coverage job 5 min against about 11.5 min on 3.13.
  • Before: the updated tests/test_ci_coverage.py against the 3.13 setup: 13 failures, 4 errors.
    After: 14 tests pass; 21 workflow, docs, release and hygiene modules pass on Python 3.14 (one test skipped); ruff check and format pass.
  • Full runs with this layout: run 47094743956, three attempts on the same commit, all green: 436 s, 472 s and 465 s. The last three pull-request runs on the 3.13 setup that did not overlap other measurements took 780 s, 785 s and 804 s, so 39-46 % faster. Slowest job per attempt: 362 s, 398 s and 395 s; some jobs still exceed five minutes.

Checked against earlier work

#254 (2026-11-16) already measured sys.monitoring on one kernel probe and asked for validation before any switch:

Asked by #254 State
Coverage differs between interpreters; validate it Compared locally over the same 158 files: branch destinations are identical (7,412). Statements go from 18,459 to 18,305: all 154 are class-body field annotations without a value, which 3.14 no longer executes. No other statement differs.
The gate's missing-branch rejection tests tests/test_ci_coverage.py: 14 pass on 3.14 with COVERAGE_CORE=sysmon set.
Native Linux and Windows paths, exact thresholds, candidate provenance Run 47092644862 passed the unchanged gate on both systems.
Retain every scientific case No test, sample count or tolerance changes.
Accept only after an end-to-end run shows less wall time Met: three full runs, 436-472 s against 780-804 s.< 8000 /td>

Open PRs: #463 also edits CHANGELOG.md; a trial merge shows no conflict.

Merge Danger

Door: two-way. Reverting the commit restores the 3.13 setup.

Blast Radius: CI only.

  • Coverage is counted as Python 3.14 sees the code, no longer 3.13. 3.13 still runs the full suite.
  • The native wheel/sdist check on Windows moves from 3.13 to 3.14; Linux still checks 3.13.
  • Live PHREEQC, style and docs jobs stay on 3.13. The release workflow is unchanged.
  • Shard weights are still the ones measured on 3.13; they can be rebuilt from this PR's logs later.

@rafatahmed rafatahmed added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Dec 3, 2026
@rafatahmed rafatahmed self-assigned this Dec 3, 2026
@read-the-docs-community
Copy link
Copy Markdown

📖 3 files modified


Preview · build overview · Flahax · built Dec. 3, 2026, 11:19 a.m. UTC

@codecov
codecov Bot commented Dec 3, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100. 8000 00%. Comparing base (25d24be) to head (1c16b09).

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #464    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          155       155            
  Lines        18459     18305   -154     
  Branches      3706      3706            
==========================================
- Hits         18459     18305   -154     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@rafatahmed
rafatahmed marked this pull request as ready for review December 3, 2026 12:05
@rafatahmed
rafatahmed merged commit d43a47a into main Dec 3, 2026
78 checks passed
@rafatahmed
rafatahmed deleted the ci/coverage-314-421 branch December 3, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0