Skip to content

ci: shard the dev checks in the Python 3.14 test parts - #108

Merged
kcramakrishna merged 1 commit into
devfrom
ci/dev-tests-shards
Nov 10, 2026
Merged

kcramakrishna merged 1 commit into
devfrom
ci/dev-tests-shards

Conversation

@kcramakrishna

Copy link
Copy Markdown
Contributor

Bottom line

test (part 2, Python 3.14) set the length of 9 of the last 10 merge-queue runs (76-97 s). Every other job took 60 s or less, except one test-dev outlier at 84 s. This PR splits dev/tests over the two 3.14 parts. Expected result: the 3.14 parts drop to about 60 s, and the critical path drops to about 60-70 s (inferred). It adds no job.

Measured cause (checked)

  • Inside 3.14 part 2, the whole dev/tests suite took 57-87 s. The engine shard and the audit-tools shard in the same job finished by 59 s (job logs, 6 runs).
  • One module dominates: test_implement_eval takes 38 s of 53 s on 3.14 and 32 s of 44 s on 3.11 (local). Each of its 58 tests builds a fresh git scenario.
  • The shard balance of the engine and audit-tools suites is fine. 3.14 runs about 20% slower than 3.11 locally; sharing 4 vCPUs with two shards adds the rest.

Change

  • dev/test_shard.py knows the dev suite; dev/test_shard_weights.json has its weights (--measure).
  • Makefile: TEST_SHARDED_SUITES := engine audit-tools dev, which test-part uses, and a new test-dev-shard target. test-implement-tools and verify-rules move to part 2: dev shard 1 is test_implement_eval alone.
  • Unchanged: the 3.11 test-dev job, coverage-part, coverage-combine SHARDED=1 (coverage.py never measured dev/), and the nightly unsharded run.
  • dev/tests/test_ci_parity.py pins the new layout: test-part shards every runner suite; coverage-part shards a subset.

Local A/B, 4 CPUs, Python 3.14 (checked)

part 1 part 2
before 42.4 s 53.3 s
after 38.4 s 35.5 s

The test counts per suite are the same (806 engine, 1102 audit tools, 395 dev, 135 implement tools).

Gates (checked, local)

make check (with workflow-lint), make security, make docs-lint, make self-audit, make coverage (92%, 9633 statements, 801 missed) and make commit-lint RANGE=origin/dev..HEAD all pass.

🤖 Generated with Claude Code

The whole dev/tests suite ran inside 3.14 part 2 beside two other shards and
set the length of every merge-queue run: 76-97 s, against 60 s or less for
every other job (10 merge_group runs, 2026-11-09/10). Inside that job the dev
suite took 57-87 s; the engine and audit-tools shards ended by 59 s.

dev/test_shard.py now knows the dev suite, and test-part shards it
(TEST_SHARDED_SUITES). Shard 1 is test_implement_eval alone (38 s locally);
shard 2 holds the other 20 modules (14 s), so the small whole targets
(test-implement-tools, verify-rules) move to part 2. The 3.11 test-dev job,
coverage-part and coverage-combine are unchanged; coverage.py never measured
dev/.

Locally, on 4 CPUs with Python 3.14, the slower part drops from 53 s to 38 s,
with the same test counts per suite.

Roadmap-Step: CS6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kcramakrishna
kcramakrishna added this pull request to the merge queue Nov 10, 2026
Merged via the queue into dev with commit 2dd517d Nov 10, 2026
18 checks passed
@kcramakrishna
kcramakrishna deleted the ci/dev-tests-shards branch November 10, 2026 00:29
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