Repository navigation
Description
Problem
The job Changed-Test Independence (.github/workflows/ci.yml, timeout-minutes: 15) runs each changed test file three times in shuffled order with devops ci test --repeat 3, in one process. Its time grows with the number of changed test files. A pull request that changes many test files reaches the job timeout, and GitHub cancels the job. The cancel tells nothing about test independence.
Measured on PR #6562 (head e78252815): the job collected 1,473 changed tests at 21:00:58, and one pass took 454 s. The second pass was cancelled at 21:15:31. The next head of the same PR changes more tests. The required check Tests & Coverage runs the whole suite in five shards at about 290 s each, so this job takes more time than the full test check.
The check is not required, so it does not block a merge. But a cancelled run gives no result, and a check that runs over 5 min + 1 min is a P0 bug (AGENTS.md rule 5).
Expected
The job gives a pass or fail result for each pull request, inside the 5 min + 1 min limit, with no lower timeout and no smaller set of changed tests. Possible ways: run the repeats in parallel workers, or in shards as Tests & Coverage does. Do not raise the timeout.
Proof
A pull request that changes more than 1,000 tests finishes the job with a result, under 6 min.
Source
Source: #6562
Alternatives check of 2026-11-20: not-applicable.
Class: ci, no search.
Tool: none found.
Proposed design
Problem statement
The Changed-Test Independence job runs each changed test file three times in one process. Its time grows with the number of changed test files, and a large pull request reaches the 15-minute job limit. GitHub then cancels the job, and the cancel gives no result. The change splits the changed files across shard jobs and adds one aggregate job. The check then gives a pass or fail result under 6 minutes, with the same tests and the same three passes.
Acceptance criteria
Requirement: Shard selection of a changed-test run
devops ci test SHALL apply --shard N --shards M to the test files that it runs.
Scenario: Three shards of a changed-file list
- WHEN a test runs
devops ci testwith--shard 2 --shards 3on a list of changed test files - THEN the run collects only the files of shard 2, and the three shard lists together hold each file of the list exactly once
Requirement: Repeat passes of one shard
A sharded run of devops ci test --repeat 3 SHALL run each of its three passes over the files of its own shard only.
Scenario: Three shuffled passes of shard 1
- WHEN a test runs
devops ci test --repeat 3 --shard 1 --shards 2on a list of changed test files - THEN each of the three passes gets every file of shard 1, and no file of shard 2
Requirement: No cached verdict in a sharded run
A sharded run of devops ci test SHALL read no cached verdict and SHALL write none.
Scenario: Sharded run with a cache present
- WHEN a test runs
devops ci test --shard 1 --shards 2with a cached verdict in the data directory - THEN the run ignores the cached verdict and leaves the cached file unchanged
Requirement: Workflow gate on the edited workflow
The change SHALL keep .github/workflows/ci.yml valid for the actionlint and zizmor rows.
Scenario: The workflow gates on the edited file
- WHEN a contributor runs
uv run devops ci --check --only actionlint,zizmor - THEN the command exits 0 and reports no finding
Requirement: The independence check finishes under 6 minutes
The Changed-Test Independence check SHALL run the changed test files in shard jobs with one aggregate job, and SHALL give a pass or fail result in under 6 minutes for a pull request that changes more than 1,000 test files.
Scenario: A pull request with more than 1,000 changed tests
- WHEN a pull request that changes more than 1,000 test files runs the workflow
- THEN the check shows one
Changed-Test Independence (shard N of M)job for each matrix entry and one aggregateChanged-Test Independencejob, and it ends with a pass or fail result in under 6 minutes
Requirement: Aggregate result of the shard jobs
The aggregate Changed-Test Independence job MUST fail when any shard job fails.
Scenario: One failing shard
- WHEN one shard job of the check fails on a pull request
- THEN the aggregate job ends red and its log names the result of each shard job
Existing Tool Considered
The alternatives block of 2026-11-20 in the issue body holds the result for this item, and it names no tool. The closest open, maintained library is pytest-xdist (https://pypi.org/project/pytest-xdist/). It runs tests in parallel workers inside one process, so it lacks a shard job with its own time bound and a matrix that GitHub shows as separate jobs. The change reuses the shard mechanism that the project keeps in devops ci test --shard/--shards and the GitHub Actions matrix. Written cost of the code that the project keeps: about 150k tokens to build, keep and fix, and about 4 hours of elapsed time.
Key questions
- How does the check give a result under 6 minutes with the same tests and no higher timeout?: Split the changed test files across a matrix of shard jobs and add one aggregate job, as
Tests & Coveragedoes. Each shard runs the three shuffled passes over its own files. (best practice) [sources: .github/workflows/ci.yml, openspec/specs/ci-test-shards/spec.md, AGENTS.md]- Chosen: Matrix of shard jobs and one aggregate job. The project records this pattern for long test work in the ci-test-shards spec, and the workflow already uses it for the suite.
- Rejected: Three jobs, one for each repeat pass. It gives a 3x gain only, so a larger changed set still reaches the limit, and it needs a new option for the pass seed.
- Rejected: Parallel workers of pytest-xdist in one job. It keeps one job and one time bound, and the workers share the state of one process.
- Rejected: A higher job timeout. The issue forbids it, and the job still gives no result before the cancel.
- How many shard jobs does the matrix hold, and how does the split balance the files?: Eight shard jobs. The test row balances the selected files by the recorded seconds in
tests/module_durations.json, the record that the suite shards use. (best practice) [sources: .github/workflows/ci.yml, tests/module_durations.json]- Chosen: Eight shard jobs, balanced by the recorded seconds. The measured 454 s per pass over 1,473 tests gives about 57 s per pass in one shard, about 170 s for three passes, and about one minute of setup.
- Rejected: Four shard jobs. The same measurement gives about 341 s for three passes, which leaves no margin under the 300 s step limit.
- Rejected: A matrix that a prepare job computes from the recorded seconds. It needs a prepare job and a new command output, and the fixed matrix meets the proof of the issue.
- Which job holds the check name
Changed-Test Independence?: The aggregate job holds it, and the shard jobs areChanged-Test Independence (shard N of M). This mirrorsTests & Coverageand its shard jobs, and no ruleset reads the name because the check is not required. (best practice) [sources: .github/workflows/ci.yml, docs/adr/0004-ci-is-the-authoritative-gate.md]- Chosen: The aggregate job holds the name. A person reads one check with one result, as with
Tests & Coverage. - Rejected: Each shard job holds the name. A matrix makes the name of the check unstable in the checks list.
- Rejected: A new name for the check. It loses the history of the check, and no reason asks for it.
- Chosen: The aggregate job holds the name. A person reads one check with one result, as with
- What does the aggregate job do when a shard job fails?: It fails and prints the result of each shard job, as the step
Require Passing Test Shardsdoes. (best practice) [sources: .github/workflows/ci.yml]- Chosen: Fail with the result of each shard. The step
Require Passing Test Shardsalready does this, and one red check names the failed shard. - Rejected: Pass when the first shard passes. It hides a failed shard and gives a wrong result.
- Rejected: Retry a failed shard once. A retry hides a flaky test that the check exists to find.
- Chosen: Fail with the result of each shard. The step
- Does a sharded repeat run read or write the cached verdict?: No. A sharded run reads no cached verdict and writes none, because a shard's verdict is not the verdict of the whole set. (best practice) [sources: openspec/specs/ci-test-shards/spec.md]
- Chosen: Read no cached verdict and write none. The ci-test-shards spec requires it for each sharded run.
- Rejected: Reuse one cached verdict for each shard. The cached verdict covers the whole set, so a shard cannot use it.
- Rejected: Write one cached verdict for each shard. A shard of a changed set is not stable between runs, so the cache would be stale.
- Does
devops ci testalready take the shard selection?: Yes. The ci-test-shards spec says that the test row runs one shard of the suite, and the workflow calls the row with--shardand--shards. The change adds the--repeatinteraction and the workflow matrix. [sources: openspec/specs/ci-test-shards/spec.md, .github/workflows/ci.yml]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 20, 2026
The job times out and gives no result, which the project rules define as a P0 bug.Both address a CI test job exceeding its time limit, but the candidate targets Changed-Test Independence while 4473 targets Tests & Coverage.devops-cli-service commentedon Nov 20, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
devops-cli-service commentedon Nov 20, 2026
Plan state: branch
ci/6564-changed-test-independence-times-out-on, draft pull request #6568. The pull request plans the item and closes no issue. The stage job and the step fix-plan edit this comment, and a comment of each run tells what the run did.The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:
A model review of the plan found these points. They stop no draft, and a person judges them:
criterion_droppedat issue (### Requirement: No cached verdict in a sharded run): The issue's criterion that a shardeddevops ci testrun reads and writes no cached verdict has no task in the plan, and the reason the plan gives cites a base requirement that namesdevops ci, notdevops ci test. Evidence: "A sharded run ofdevops ci testSHALL read no cached verdict and SHALL write none."spec_delta_wrongat spec ci-test-shards (The workflow runs Changed-Test Independence in shards): The scenarioOne failing shardjoins the unassertable claim that the aggregate job ends red with an unrelated actionlint run, and it drops the issue'sits log names the result of each shard job, so no test can assert the scenario's own subject. Evidence: "the jobChanged-Test Independenceends red, anduv run devops ci --check --only actionlint,zizmorexits 0 on.github/workflows/ci.yml"otherat issue (A pull request that changes more than 1,000 tests finishes the job with a result, under 6 min.): The plan states no requirement for the issue's six-minute bound and no group measures the check's duration: the result rests on an estimate while the shard step keeps a twelve-minute limit under a fifteen-minute job. Evidence: "A pull request that changes more than 1,000 tests finishes the job with a result, under 6 min."otherat tasks (2): The group does not say what a sharded run does when the named paths force a full run, which_resolve_test_targetsreports withNone, soshard_pathswould be handed no list and a shard could run the whole suite that the group means to prevent. Evidence: "replace the targets with the files of the shard:shard_test_fileswhen the run names no path,shard_pathswhen it names paths"false_premiseat proposal (existing_tool): The plan repeats the issue's sentence on the written cost of the code with a figure the issue does not support, and gives no reason for the lower estimate. Evidence: "Written cost of the code that the project keeps: about 150k tokens to build, keep and fix, and about 4 hours of elapsed time."devops-cli-service commentedon Nov 20, 2026
The stage job staged the plan of draft pull request #6568. The plan state comment of #6568 holds the branch, the task groups and the findings.
The default branch changed these paths that the plan names, after the commit that the planner read. Read the commits before you judge the plan:
src/devops_cli/commands/ci.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)src/devops_cli/lang/en/help.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)src/devops_cli/lang/en/messages.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)tests/ci/test_fail_to_pass.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)tests/commands/test_all_commands_help_dryrun.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)tests/commands/test_ci.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)tests/commands/test_dependency_audit.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)tests/docs/test_docs.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)tests/invariants/test_hermetic_floor.py: ebec015 refactor(deps): delete install-tools and the tools lock (refactor(deps): delete install-tools and the tools lock #6555)The runs of the planner and the review made 207 model request(s), and used 15925471 input tokens and 326207 output tokens. The tool calls, in order:
search_code({"text":"Changed-Test Independence"})read_spec({"capability":"ci-test-shards"})read_file({"path":".github/workflows/ci.yml","start_line":700,"end_line":880})read_spec({"capability":"ci-test-shards","requirement":"The test row runs one shard of the suite"})search_code({"text":"--repeat"})search_code({"text":"def shard"})search_code({"text":"_run_shuffled_repeats"})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":300,"end_line":400})read_file({"end_line":2400,"path":"src/devops_cli/commands/ci.py","start_line":2180})search_code({"text":"--shards"})file_symbols({"path":"src/devops_cli/commands/ci.py"})read_file({"end_line":870,"path":"src/devops_cli/commands/ci.py","start_line":806})read_file({"end_line":2180,"path":"src/devops_cli/commands/ci.py","start_line":2101})references({"name":"_run_shuffled_repeats"})search_code({"text":"shard_test_files"})search_code({"text":"repeat"})search_code({"text":"repeat_needs_targets"})search_code({"text":"--repeat\", \"3"})read_file({"path":"tests/commands/test_ci_repeat.py"})read_spec({"capability":"ci-test-shards","requirement":"A sharded run reads and writes no cached verdict"})read_spec({"capability":"ci-test-shards","requirement":"The workflow runs the test row in shards"})search_code({"text":"shards"})read_file({"end_line":1880,"path":"src/devops_cli/commands/ci.py","start_line":1760})search_code({"text":"rule 5"})read_file({"end_line":60,"path":"AGENTS.md","start_line":1})read_file({"end_line":70,"path":"docs/commands/ci.md","start_line":1})search_code({"text":"shard_above_total"})search_code({"text":"docs/commands/ci.md"})search_code({"text":"ci test"})search_code({"text":"ci_test"})search_code({"text":"devops ci test"})search_code({"text":"devops ci test [OPTIONS]"})search_code({"text":"First shuffle seed for --repeat"})read_file({"end_line":2002,"path":"src/devops_cli/commands/ci.py","start_line":1938})read_file({"end_line":960,"path":"src/devops_cli/lang/en/help.py","start_line":870})search_code({"text":"shard: str"})read_file({"end_line":1030,"path":"src/devops_cli/lang/en/help.py","start_line":1000})search_code({"text":"changed test files"})read_spec({"capability":"ci-test-selection"})search_code({"text":"Changed-Test"})read_file({"path":"tests/commands/test_ci.py","start_line":1870,"end_line":1915})read_file({"path":"openspec/specs/ci-job-time/spec.md","start_line":140,"end_line":170})read_file({"end_line":1870,"path":"tests/commands/test_ci.py","start_line":1790})search_code({"text":"changed-tests"})search_code({"text":"def shard_test_files"})read_file({"path":".github/workflows/ci.yml","start_line":735,"end_line":860})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":320,"end_line":420})read_file({"end_line":2400,"path":"src/devops_cli/commands/ci.py","start_line":2240})read_file({"end_line":1840,"path":"src/devops_cli/commands/ci.py","start_line":1815})read_file({"end_line":140,"path":"tests/commands/test_ci_shard.py","start_line":1})read_file({"end_line":1915,"path":"tests/commands/test_ci.py","start_line":1845})read_file({"end_line":2020,"path":"tests/commands/test_ci.py","start_line":1915})search_code({"text":"_validate_ci_workflow_parity("})read_file({"end_line":140,"path":"tests/commands/test_ci_repeat.py","start_line":100})search_code({"text":"class CICommandHelp"})read_file({"end_line":1010,"path":"src/devops_cli/lang/en/help.py","start_line":905})read_file({"end_line":25,"path":"AGENTS.md","start_line":1})read_spec({"capability":"ci-test-shards","requirement":"The workflow runs the test row in shards"})read_spec({"capability":"ci-test-shards","requirement":"The job Tests & Coverage aggregates the shards"})read_file({"end_line":1880,"path":"src/devops_cli/commands/ci.py","start_line":1836})search_code({"text":"shard_above_total"})search_code({"text":"\"docs\""})search_code({"text":"CHECK_ROW_NAMES"})search_code({"text":"_with_test_shard"})read_file({"end_line":120,"path":"tests/commands/test_ci_repeat.py","start_line":1})search_code({"text":"Changed-Test Independence"})list_files({"directory":"docs/commands"})search_code({"text":"timeout-minutes"})find_issues({"terms":"Changed-Test Independence"})read_issue({"number":4473})read_issue({"number":4722})read_issue({"number":6562})references({"name":"changed-tests"})references({"name":"Changed-Test Independence"})read_spec({"capability":"ci-test-shards","requirement":"The shards balance the recorded seconds"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})search_code({"text":"no_testable_files"})search_code({"text":"def _resolve_test_targets"})list_files({"directory":"src/devops_cli/lang"})read_file({"end_line":60,"path":"tests/lang/test_language_catalogs.py","start_line":1})search_code({"text":"nothing to run"})search_code({"text":"no test file"})read_file({"end_line":2330,"path":"src/devops_cli/lang/en/messages.py","start_line":2280})search_code({"text":"changed-tests"})read_spec({"capability":"ci-job-time"})read_spec({"capability":"ci-test-shards"})read_file({"path":".github/workflows/ci.yml","start_line":740,"end_line":830})read_file({"path":"openspec/specs/ci-job-time/spec.md","start_line":145,"end_line":170})search_code({"text":"def shard_test_files"})search_code({"text":"_run_shuffled_repeats"})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2230,"end_line":2345})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":330,"end_line":420})read_file({"path":"tests/commands/test_ci_shard.py","start_line":1,"end_line":140})read_file({"path":"tests/commands/test_ci_repeat.py","start_line":100,"end_line":160})search_code({"text":"shard_above_total"})read_file({"end_line":1850,"path":"src/devops_cli/commands/ci.py","start_line":1815})read_file({"end_line":1900,"path":"tests/commands/test_ci.py","start_line":1845})list_files({"directory":"tests/commands"})list_files({"directory":"docs/commands"})read_file({"end_line":2320,"path":"src/devops_cli/lang/en/messages.py","start_line":2295})read_file({"end_line":1060,"path":"src/devops_cli/commands/ci.py","start_line":1030})list_files({"directory":"tests/ci"})search_code({"text":"Changed-Test Independence"})search_code({"text":"shard_paths"})search_code({"text":"shard_empty"})search_code({"text":"shard: str ="})read_file({"end_line":1022,"path":"src/devops_cli/lang/en/help.py","start_line":1004})search_code({"text":"Changed-Test Independence"})search_code({"text":"def test("})read_file({"path":".github/workflows/ci.yml","start_line":730,"end_line":840})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2270,"end_line":2350})read_file({"end_line":1860,"path":"src/devops_cli/commands/ci.py","start_line":1810})read_file({"end_line":2270,"path":"src/devops_cli/commands/ci.py","start_line":2235})read_file({"end_line":400,"path":"src/devops_cli/core/test_selection.py","start_line":330})read_file({"end_line":140,"path":"tests/commands/test_ci_shard.py","start_line":1})read_file({"end_line":1060,"path":"src/devops_cli/commands/ci.py","start_line":1035})read_file({"end_line":2320,"path":"src/devops_cli/lang/en/messages.py","start_line":2295})read_file({"end_line":1025,"path":"src/devops_cli/lang/en/help.py","start_line":1000})read_file({"end_line":1900,"path":"tests/commands/test_ci.py","start_line":1850})read_file({"end_line":140,"path":"tests/commands/test_ci_repeat.py","start_line":95})read_spec({"capability":"ci-test-shards"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})read_spec({"capability":"ci-test-shards","requirement":"A sharded run reads and writes no cached verdict"})read_issue({"number":6562})read_issue({"number":4473})find_issues({"terms":"Changed-Test Independence"})read_issue({"number":4722})read_spec({"capability":"ci-job-time","requirement":"The test jobs skip the bytecode compile"})list_files({"directory":"docs/commands"})list_files({"directory":"tests/commands"})read_file({"end_line":1980,"path":"tests/commands/test_ci.py","start_line":1900})search_code({"text":"changed-tests"})search_code({"text":"CONST_CI_TEST_DURATIONS_PATH ="})search_code({"text":"CONST_TESTS_ROOT_DIR ="})search_code({"text":"shard_paths"})search_code({"text":"shard_empty"})search_code({"text":"CONST_CI_TEST_DURATIONS_PATH"})search_code({"text":"CONST_TESTS_ROOT_DIR"})search_code({"text":"changed-tests"})search_code({"text":"Changed-Test Independence"})read_file({"path":".github/workflows/ci.yml","start_line":745,"end_line":835})list_files({"directory":"tests/commands"})file_symbols({"path":"src/devops_cli/core/test_selection.py"})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":321,"end_line":390})list_files({"directory":"tests/roadmap/implement"})read_file({"end_line":2360,"path":"src/devops_cli/commands/ci.py","start_line":2280})read_file({"path":"tests/commands/test_ci_shard.py","start_line":1,"end_line":130})read_file({"end_line":1870,"path":"src/devops_cli/commands/ci.py","start_line":1800})read_file({"end_line":160,"path":"tests/commands/test_ci_repeat.py","start_line":90})read_spec({"capability":"ci-test-shards","requirement":"A sharded run reads and writes no cached verdict"})search_code({"text":"resolve_ci_cache_path"})search_code({"text":"shard_empty"})search_code({"text":"shard_above_total"})search_code({"text":" shard: str = ("})read_file({"path":"src/devops_cli/lang/en/help.py","start_line":1000,"end_line":1020})read_file({"end_line":2000,"path":"tests/commands/test_ci.py","start_line":1850})list_files({"directory":"docs/commands"})search_code({"text":"release-please--"})search_code({"text":"timeout-minutes"})search_code({"text":"workflows/ci.yml"})search_code({"text":".github/workflows"})search_code({"text":"CONST_CI_TEST_DURATIONS_PATH: Final[str]"})search_code({"text":"CONST_TESTS_ROOT_DIR: Final[str]"})search_code({"text":"name=\"docs\""})search_code({"text":"docs, \"check\""})search_code({"text":"commands/"})read_issue({"number":6562})read_issue({"number":4473})find_issues({"terms":"Changed-Test Independence"})search_code({"text":"ci_runs_main"})search_code({"text":"ci.yml"})search_code({"text":"workflows\" / \"ci.yml"})search_code({"text":"\"ci.yml\""})read_file({"end_line":140,"path":"tests/invariants/test_workflow_contracts.py","start_line":1})read_file({"end_line":790,"path":"tests/invariants/test_architectural_invariants.py","start_line":660})search_code({"text":"def _resolve_test_targets"})search_code({"text":"def _run_shuffled_repeats"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})read_file({"end_line":2282,"path":"src/devops_cli/commands/ci.py","start_line":2240})search_code({"text":"[tool.pytest.ini_options]"})search_code({"text":"Changed-Test Independence"})search_code({"text":"def test("})read_file({"path":".github/workflows/ci.yml","start_line":740,"end_line":840})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2280,"end_line":2345})file_symbols({"path":"src/devops_cli/core/test_selection.py"})search_code({"text":"shard_above_total"})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":321,"end_line":390})read_file({"path":"tests/commands/test_ci_shard.py","start_line":1,"end_line":120})search_code({"text":"\"changed-tests\""})search_code({"text":"shards: str = ("})read_file({"path":"tests/commands/test_ci.py","start_line":1856,"end_line":1975})read_file({"path":"src/devops_cli/lang/en/help.py","start_line":1000,"end_line":1020})search_code({"text":"test_each_repeat_pass_runs_only_the_files_of_its_shard"})read_file({"path":"tests/commands/test_ci_repeat.py","start_line":100,"end_line":140})read_spec({"capability":"ci-test-shards"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})search_code({"text":"CONST_CI_TEST_DURATIONS_PATH"})search_code({"text":"CONST_TESTS_ROOT_DIR: Final"})search_code({"text":"shard_paths"})search_code({"text":"shard_empty"})search_code({"text":"name=\"docs\","})search_code({"text":"docs generate"})read_file({"path":"tests/invariants/test_workflow_contracts.py","start_line":70,"end_line":110})list_files({"directory":"docs/commands"})read_file({"path":"tests/invariants/test_workflow_contracts.py","start_line":1,"end_line":75})search_code({"text":"def _resolve_test_targets"})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2101,"end_line":2135})read_issue({"number":4473})find_issues({"terms":"Changed-Test Independence"})search_code({"text":"test_test_selection.py"})search_code({"text":"test_roadmap_implement_amend.py"})read_spec({"capability":"ci-job-time","requirement":"The test jobs skip the bytecode compile"})read_file({"path":"tests/commands/test_test_selection.py","start_line":1,"end_line":12})search_code({"text":"Changed-Test Independence"})search_code({"text":"changed-tests"})read_file({"path":".github/workflows/ci.yml","start_line":740,"end_line":830})search_code({"text":"_run_shuffled_repeats"})search_code({"text":"shard_test_files"})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2250,"end_line":2345})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":320,"end_line":395})read_file({"path":"tests/invariants/test_workflow_contracts.py","start_line":1,"end_line":130})read_file({"path":"tests/commands/test_ci.py","start_line":1850,"end_line":1990})read_file({"end_line":860,"path":"src/devops_cli/commands/ci.py","start_line":800})read_file({"end_line":1860,"path":"src/devops_cli/commands/ci.py","start_line":1820})read_spec({"capability":"ci-test-shards"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})read_spec({"capability":"ci-test-shards","requirement":"The test row runs one shard of the suite"})read_file({"path":"tests/commands/test_ci_shard.py","start_line":1,"end_line":70})read_file({"path":"tests/commands/test_ci_repeat.py","start_line":1,"end_line":140})search_code({"text":"job-total"})search_code({"text":"Changed-Test"})read_file({"path":"src/devops_cli/lang/en/help.py","start_line":1000,"end_line":1020})read_file({"path":"src/devops_cli/config/constants.py","start_line":755,"end_line":762})read_file({"path":"src/devops_cli/config/constants.py","start_line":2568,"end_line":2573})search_code({"text":"shard_empty"})read_file({"end_line":115,"path":"tests/commands/test_ci_shard.py","start_line":85})list_files({"directory":"docs/commands"})read_file({"end_line":2315,"path":"src/devops_cli/lang/en/messages.py","start_line":2300})read_spec({"capability":"ci-test-shards","requirement":"The workflow runs the test row in shards"})read_spec({"capability":"ci-test-shards","requirement":"The job Tests & Coverage aggregates the shards"})search_code({"text":"name=\"docs\""})search_code({"text":"docs generate"})read_spec({"capability":"docs-cli-reference"})read_file({"end_line":1060,"path":"src/devops_cli/commands/ci.py","start_line":1035})list_files({"directory":"tests/invariants"})search_code({"text":"workflows/ci.yml"})search_code({"text":"ALLOWED_JOB_PERMISSIONS"})search_code({"text":"permission"})search_code({"text":"actions: write"})read_file({"end_line":2050,"path":"tests/commands/test_ci.py","start_line":1990})search_code({"text":"startsWith(github.head_ref"})read_file({"end_line":780,"path":"tests/invariants/test_workflow_contracts.py","start_line":700})read_file({"end_line":830,"path":"tests/commands/test_ci.py","start_line":795})search_code({"text":"Changed-Test Independence"})search_code({"text":"changed-tests"})read_file({"path":".github/workflows/ci.yml","start_line":735,"end_line":830})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":300,"end_line":400})search_code({"text":"def test("})search_code({"text":"shard_test_files"})read_file({"path":"src/devops_cli/commands/ci.py","start_line":800,"end_line":870})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2270,"end_line":2360})read_file({"end_line":2272,"path":"src/devops_cli/commands/ci.py","start_line":2200})read_file({"end_line":1870,"path":"src/devops_cli/commands/ci.py","start_line":1800})read_spec({"capability":"ci-test-shards"})search_code({"text":"shard_above_total"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})read_spec({"capability":"ci-test-shards","requirement":"The test row runs one shard of the suite"})search_code({"text":"shard: str = ("})search_code({"text":"_validate_ci_workflow_parity"})read_file({"path":"tests/commands/test_ci.py","start_line":1856,"end_line":1990})read_file({"path":"tests/commands/test_ci_shard.py","start_line":80,"end_line":130})read_file({"end_line":140,"path":"tests/commands/test_ci_repeat.py","start_line":100})read_file({"end_line":120,"path":"tests/invariants/test_workflow_contracts.py","start_line":30})search_code({"text":"def _resolve_test_targets"})search_code({"text":"devops docs generate"})read_file({"end_line":1025,"path":"src/devops_cli/lang/en/help.py","start_line":1005})search_code({"text":"CONST_CI_TEST_DURATIONS_PATH: Final"})search_code({"text":"CONST_TESTS_ROOT_DIR: Final"})list_files({"directory":"docs/commands"})search_code({"text":"shard_paths"})read_file({"end_line":40,"path":"tests/commands/test_ci_shard.py","start_line":1})search_code({"text":"### devops ci test"})search_code({"text":"--repeat"})read_file({"end_line":60,"path":"docs/commands/ci.md","start_line":30})search_code({"text":"ci --check --only docs"})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2101,"end_line":2140})search_code({"text":"Detect Changed Test Files"})search_code({"text":"Changed-Test Independence"})search_code({"text":"shard_test_files"})file_symbols({"path":"src/devops_cli/core/test_selection.py"})read_file({"path":".github/workflows/ci.yml","start_line":750,"end_line":835})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":320,"end_line":400})read_file({"end_line":2345,"path":"src/devops_cli/commands/ci.py","start_line":2250})read_file({"end_line":855,"path":"src/devops_cli/commands/ci.py","start_line":815})read_file({"end_line":1865,"path":"src/devops_cli/commands/ci.py","start_line":1815})read_file({"end_line":45,"path":"tests/commands/test_ci_shard.py","start_line":1})read_file({"end_line":140,"path":"tests/commands/test_ci_repeat.py","start_line":100})read_file({"end_line":1900,"path":"tests/commands/test_ci.py","start_line":1856})read_file({"end_line":1990,"path":"tests/commands/test_ci.py","start_line":1900})read_file({"end_line":120,"path":"tests/invariants/test_workflow_contracts.py","start_line":30})search_code({"text":"shard_paths"})search_code({"text":"def _collect_ci_workflow_run_steps"})file_symbols({"path":"src/devops_cli/core/test_selection.py"})search_code({"text":"shard_paths"})read_file({"path":"src/devops_cli/core/test_selection.py","start_line":320,"end_line":400})read_file({"path":"src/devops_cli/commands/ci.py","start_line":2240,"end_line":2400})read_file({"path":"src/devops_cli/commands/ci.py","start_line":1800,"end_line":1870})read_file({"end_line":850,"path":".github/workflows/ci.yml","start_line":740})read_file({"path":"tests/invariants/test_workflow_contracts.py","start_line":1,"end_line":170})search_code({"text":"_validate_ci_workflow_parity"})read_file({"path":"tests/commands/test_ci.py","start_line":1856,"end_line":1990})references({"name":"Changed-Test Independence"})references({"name":"changed-tests"})read_spec({"capability":"ci-test-shards"})read_file({"end_line":175,"path":"openspec/specs/ci-job-time/spec.md","start_line":130})read_spec({"capability":"ci-test-shards","requirement":"The test row runs one shard of the suite"})read_spec({"capability":"ci-test-shards","requirement":"Each shard collects only its own test files"})search_code({"text":"shard_above_total"})search_code({"text":"shards: str ="})search_code({"text":"def _resolve_test_targets"})search_code({"text":"Require Passing Test Shards"})search_code({"text":"job-total"})read_file({"end_line":300,"path":".github/workflows/ci.yml","start_line":120})read_file({"end_line":330,"path":".github/workflows/ci.yml","start_line":263})search_code({"text":"def resolve_step_rows"})search_code({"text":"def resolve_devops_argv"})read_file({"path":"src/devops_cli/commands/ci.py","start_line":1280,"end_line":1320})read_file({"path":"src/devops_cli/core/command_resolver.py","start_line":1,"end_line":130})search_code({"text":"resolve_devops_argv"})search_code({"text":"test_every_devops_command_the_workflows_actions_and_hooks_run_resolves"})read_file({"end_line":470,"path":"tests/invariants/test_workflow_contracts.py","start_line":330})read_file({"end_line":1530,"path":"tests/commands/test_ci.py","start_line":1470})search_code({"text":"5 min + 1 min"})search_code({"text":"rule 5"})search_code({"text":"docs/commands/ci.md"})search_code({"text":"def _docs_check"})search_code({"text":"\"docs\""})read_spec({"capability":"ci-test-shards","requirement":"A sharded run reads and writes no cached verdict"})read_spec({"capability":"ci-test-shards","requirement":"The shards balance the recorded seconds"})callers({"symbol":"record_passing_run"})callers({"symbol":"get_ci_cache"})search_code({"text":"record_passing_run"})search_code({"text":"_load_workflow(WORKFLOWS_DIR / \"ci.yml\")"})search_code({"text":"ci.yml\")[\"jobs\"]"})read_file({"end_line":172,"path":"docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md","start_line":155})read_file({"end_line":1050,"path":"src/devops_cli/commands/ci.py","start_line":1035})read_file({"end_line":860,"path":"src/devops_cli/commands/ci.py","start_line":805})read_file({"end_line":2040,"path":"tests/commands/test_ci.py","start_line":1984})list_files({"directory":"docs/commands"})list_files({"directory":"tests/roadmap/implement"})search_code({"text":"def shard"})search_code({"text":"shard_test_files"})read_file({"end_line":270,"path":"tests/commands/test_ci_shard.py","start_line":130})read_file({"end_line":300,"path":"tests/invariants/test_workflow_contracts.py","start_line":160})search_code({"text":"in a 'run'"})read_file({"end_line":700,"path":"tests/invariants/test_workflow_contracts.py","start_line":560})search_code({"text":"has no permissions"})search_code({"text":"timeout-minutes"})read_file({"end_line":2160,"path":"src/devops_cli/commands/ci.py","start_line":2101})list_files({"directory":"tests/docs"})search_code({"text":"docs check"})read_spec({"capability":"ci-test-shards","requirement":"The job Tests & Coverage aggregates the shards"})read_spec({"capability":"ci-test-shards","requirement":"The workflow runs the test row in shards"})search_code({"text":"timeout = "})Tool calls: callers=2 (empty=0), file_symbols=5 (empty=0), find_issues=4 (empty=0), list_files=17 (empty=0), read_file=137 (empty=0), read_issue=9 (empty=0), read_spec=36 (empty=0), references=5 (empty=0), search_code=149 (empty=17)
The stage job read the open pull requests and their files in 1 GraphQL request(s).
The plan request held these comments of the item whole: #6564 (comment), #6564 (comment).
4 remaining items
wip: 2 of 2 tasks of group 1, Split a given list of test files into s…
devops-cli-service commentedon Nov 21, 2026
Stopped at group 1.
Failed check:
pytest on base: tests/commands/test_ci_shard.py.Failure class:
test.Action taken: none.
Action left:
repair: give the failure to a fix step.pytest on base: tests/commands/test_ci_shard.pyReason:
Last message of the agent (a claim that no check verified): Group 1 is done and committed (
0693b1136), with both tasks ticked. What I changed -tests/commands/test_ci_shard.py: addedtest_shard_paths_puts_each_given_file_in_one_shard(the named failing case: a small tree with a duration record, each given file in exactly one shard, heaviest given file to the lightest shard) plustest_shard_paths_weighs_a_given_file_that_the_tree_does_not_hold_at_no_secondfor the missing-file rule, and importedshard_paths. -src/devops_cli/core/test_selection.py: addedshard_paths(shard, shards, modules, root)— each module weighs its recorded seconds ofCONST_CI_TEST_DURATIONS_PATH, a module with no record its lines at the recorded seconds per line of the list, a module the tree does not hold 0 seconds; heaviest first to the shard with the least weight, tie to the lower shard, returning the sorted paths of shardshard. Added the private_module_lineshelper and madeshard_test_filesdelegate withdirectory_modules(CONST_TESTS_ROOT_DIR, root), so the whole-suite split keeps its weights and each module stays in one shard. Verification results -uv run devops ci test tests/commands/test_ci_shard.pyon the base (before the code change): failed at collection withImportError: cannot import name 'shard_paths'— the right reason. -uv run devops ci test tests/commands/test_ci_shard.py: 24 passed (including the pre-existing whole-suite shard cases, which pin that the delegated split is unchanged). - `uv run devops ci teThe item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.The job kept 1 work-in-progress commit on the branch
ci/6564-changed-test-independence-times-out-onon origin. The last is0693b11361fd07838d84a426b7b73a3800308ae3. The job discarded only the work after it. The next run continues from it and does the tasks that are not ticked.fix(ci): run each changed-test run on workers and its own runner (#6564)
dan-petty commentedon Nov 21, 2026
Owner decision (2026-11-21, a direct answer): "Accept, document limit".
--dist loadfile, so a changed file runs whole in one worker, in its shuffled order. A probe of one file of 60 tests with an order-dependent pair failed on 11 of 24 seeds with one process, on 0 of 24 with--dist workstealand on 11 of 24 with--dist loadfile.fix(ci): run each file of a repeat run on one worker (#6564)
devops-cli-service commentedon Nov 21, 2026
Released in v0.187.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.187.1
devops-cli-service commentedon Nov 21, 2026
Live since 2026-11-21 07:05 UTC