Skip to content

fix(ci): Tests & Coverage averages 367 s, over the 360 s limit #7550

Description

@github-actions

devops ci job-time found that the last 20 runs of Tests & Coverage of ci.yml on main took 367 s on average. The limit is 360 s. A mean over the limit is a P0 bug (AGENTS.md rule 5). Find the change that made the check slow, and fix it or revert it (docs/TESTING.md, Run time).

The jobs also waited 22 s on average for a runner. The limit does not count this time.

Run Seconds Queue seconds
46110219483 353 7
46109779941 374 2
46109159188 383 42
46109106169 374 3
46108943515 394 2
46108930477 399 3
46108816441 367 106
46108798363 420 67
46108788357 337 140
46103047841 365 2
46102488879 369 4
46102127064 337 3
46098309980 344 3
46098277385 365 3
46097437154 359 3
46097229852 367 3
46096605538 371 36
46095442718 371 3
46094921000 356 2
46091378663 341 3

Proposed design

Problem statement

The Tests & Coverage job of ci.yml averages 367 s over its last 20 runs on main, over the 360 s limit that AGENTS.md rule 5 sets (300 s plus 60 s of tolerance). The job runs five shards from the weights in tests/module_durations.json, but the record is stale: test modules added since it was written, such as tests/valkey/test_tiered.py and tests/roadmap/stores/test_listing_shared.py, have no recorded seconds, so they weigh only by lines and the shards are unbalanced. The change refreshes the record from the JUnit reports of the last 20 runs, adds a sixth shard, and updates the docs, without lowering the limit or dropping a test.

Acceptance criteria

Requirement: Six-shard split

shard_test_files MUST partition every test module of tests/ into six non-empty shards.

Scenario: Six shards cover every module once

  • WHEN uv run devops ci test tests/commands/test_ci_shard.py runs the six-shard partition case.
  • THEN The case passes, every test module is in exactly one shard, and no shard is empty.

Requirement: Six test shards

The test-shard matrix of .github/workflows/ci.yml SHALL list six shards.

Scenario: The changed workflow passes the manifest validators

  • WHEN uv run devops ci --check --only actionlint,zizmor runs on the changed workflow.
  • THEN Both validators exit 0 and report no finding.

Requirement: Docs name six shards

docs/TESTING.md and docs/SDLC.md SHALL state that the test row runs six shards.

Scenario: The changed docs pass the docs row

  • WHEN uv run devops ci --check --only docs runs on the changed docs.
  • THEN The docs row exits 0 and reports no finding.

Requirement: Record refreshed from the shard reports

tests/module_durations.json MUST hold the mean seconds of each test module over the last 20 ended Tests & Coverage runs on main that ran it, from their JUnit reports.

Scenario: The durations command writes the record

  • WHEN uv run devops ci durations runs on main before the change merges.
  • THEN It writes tests/module_durations.json, reports the number of modules and runs, and exits 0.

Requirement: Pending a person after the merge

The Tests & Coverage job SHALL average at most 360 s over its last 20 runs on main.

Scenario: The job-time alarm is clear

  • WHEN uv run devops ci job-time --job 'Tests & Coverage' reads the last 20 push runs of main after the change.
  • THEN It reports a mean of at most 360 s and exits 0.

Existing Tool Considered

The alternatives check found pytest-split (https://github.com/jerry-git/pytest-split, fetched 2026-11-28), an open, maintained pytest plugin that splits a suite into equal-time groups from a stored .test_durations file. It lacks the read of the JUnit reports in the coverage-shard-* artifacts of the last 20 GitHub Actions runs, the devops ci job-time alarm, and the per-test skip reasons that the ci-test-shards spec requires. The change reuses the existing devops ci durations and shard_test_files code and adds no new sharding library.

Key questions

None.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    priority/p0-critical
    scope/ci
    status/new
    on Nov 28, 2026
  2. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

  3. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 28, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  5. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-28 17:56 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p0-criticalscope/citype/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions