Skip to content

ci: split coverage tests into four jobs and merge reports - #792

Merged
fcostaoliveira merged 2 commits into
masterfrom
ci/coverage-suite-timeout
Oct 20, 2026
Merged

fcostaoliveira merged 2 commits into
masterfrom
ci/coverage-suite-timeout

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

The serial coverage job runs 793 integration tests and reaches its 40-minute limit before coverage capture. Split that work into four independent jobs, with a 20-minute test limit per shard, then merge their reports under the existing coverage-ubuntu check.

  • Discover the same top-level test*.py files as RLTest and distribute sorted files across four shards. Keep files intact and tests serial within each runner, with isolated gcov data.
  • Validate with RLTest collection that the shards contain every default test exactly once; include new test files automatically and reject invalid or empty shards.
  • Run instrumented C++ unit tests once on shard 1. Capture and upload all four LCOV traces, then merge them and publish one combined report. A failed or missing shard fails the existing coverage gate; partial coverage cannot pass it.

Validation: actionlint, git diff --check, and live RLTest collection passed (174 / 205 / 142 / 272 tests; 793 total, no omissions or duplicates). Exercised the workflow's merge command with four traces: hit counts sum correctly, line coverage is combined, and a missing trace fails. Invalid/empty shard selections fail. Historical run timings estimate roughly 9–11 minutes of tests per shard; fresh CI will measure actual durations.

This CI repair is separate from the MANAGER.md change in #791.


Note

Low Risk
CI-only workflow and test-sharding utilities; no runtime or product code paths change.

Overview
Splits the monolithic coverage CI job into four parallel shards so integration tests stay under per-runner time limits, then merges LCOV and publishes once under the existing coverage-ubuntu check.

The workflow adds a coverage-shards matrix (shards 1–4): each runner builds with coverage, runs a disjoint subset of test*.py via utils/select_test_shard.py (20-minute timeout vs 40), captures coverage to coverage-shard-N.info, and uploads artifacts. Shard 1 only runs make check (C++ unit coverage once) and utils/check_test_shards.py 4 to prove RLTest’s default suite is partitioned with no gaps or duplicates. coverage-ubuntu depends on all shards, fails if any shard failed, downloads artifacts, merges with lcov, and uploads to Codecov.

New helpers: select_test_shard.py round-robin-sorts tests/test*.py like RLTest discovery; check_test_shards.py cross-checks shard file lists against RLTest --collect-only.

Reviewed by Cursor Bugbot for commit cb44d93. Bugbot is set up for automated code reviews on this repo. Configure here.

@fcostaoliveira fcostaoliveira changed the title ci: allow the serial coverage suite to finish ci: split coverage tests into four jobs and merge reports Oct 19, 2026
@fcostaoliveira
fcostaoliveira merged commit 4bade81 into master Oct 20, 2026
136 checks passed
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