Skip to content

perf(ci): the gate writes no coverage XML, and the clean-up keeps the combined data - #2582

Merged
dan-petty merged 3 commits into
mainfrom
perf/1743-coverage-xml-in-ci
Oct 29, 2026
Merged

dan-petty merged 3 commits into
mainfrom
perf/1743-coverage-xml-in-ci

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The test row of devops ci wrote two coverage reports after the last test, one after the other, on the gate's critical path: the term-missing report and an XML report. Only the Changed-Line Coverage step of CI reads the XML.

  • _resolve_pytest_cmd no longer passes --cov-report=xml. The row keeps --cov=src and the term-missing report, so the 85% floor and the missing-lines list stay. devops ci coverage runs the same command and also writes no XML.
  • The Changed-Line Coverage step of ci.yml runs uv run coverage xml -q before diff-cover, so diff-cover still reads .data/coverage.xml. The step runs on pull requests only, so a push to main writes no XML.
  • _clean_coverage_artifacts globbed .coverage*, so it also deleted the combined .data/.coverage once that file was more than 60 s old. It now removes only the .coverage.* worker files, and the combined data stays for devops ci coverage --build-index and for CI. The removal of a root coverage.xml goes: [tool.coverage.xml] sends the report to .data/coverage.xml, so nothing writes a root file.

On this host the XML pass took about 19 to 24 s of the row's serial end at load 13 to 29. The proposal records the measurement.

Closes #1743

Change: openspec/changes/archive/2026-10-29-1743-coverage-xml-in-ci/

… combined data

The test row of `devops ci` wrote a term report and an XML report after
the last test, one after the other. Only CI's Changed-Line Coverage step
reads the XML. The row now writes the term report only, and that step
runs `uv run coverage xml` before diff-cover. On this host the XML pass
took about 19 to 24 s at load 13 to 29.

The coverage clean-up globbed `.coverage*`, so it also deleted the
combined `.data/.coverage` once it was 60 s old. It now removes only
the `.coverage.*` worker files. The removal of a root `coverage.xml`,
which nothing writes, goes.
@dan-petty

Copy link
Copy Markdown
Owner Author

Test evidence:

  • uv run devops ci fail-to-pass --base origin/main: 3 failed on base, 119 passed (tests/test_ci.py). The three new or changed tests failed there:
    • test_the_gate_test_row_writes_the_term_report_and_no_xml_report: the command held --cov-report=xml.
    • test_the_coverage_clean_up_keeps_the_combined_data_file: the clean-up deleted a two-hour-old .data/.coverage.
    • test_changed_line_coverage_step_fails_a_pull_request_below_ninety_percent: the step ran no coverage xml.
  • On the branch, after the rebase onto 97ed0ea9: tests/test_ci.py and tests/test_ci_dry_run.py, 132 passed.

Times on the shared host (16 CPUs), on the combined data of one full suite run (12,460 tests, 533 s at load 22 to 30), three runs each at load 13 to 29:

Command Run 1 Run 2 Run 3
coverage report -m 30.8 s 33.9 s 26.8 s
coverage xml 24.7 s 25.9 s 21.1 s
coverage --version (start-up) 1.8 s 1.6 s 2.2 s

The gate saves the XML pass, about 19 to 24 s at this load, on each local run and on each push run of CI. A pull request run of CI still writes the XML one time, in the Changed-Line Coverage step.

Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty force-pushed the perf/1743-coverage-xml-in-ci branch from bdddc9e to 0848dfd Compare October 29, 2026 01:09
@dan-petty
dan-petty marked this pull request as ready for review October 29, 2026 01:15
@dan-petty
dan-petty merged commit ae9ebb2 into main Oct 29, 2026
17 checks passed
@dan-petty
dan-petty deleted the perf/1743-coverage-xml-in-ci branch October 29, 2026 01:16
dan-petty pushed a commit that referenced this pull request Oct 29, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.13.0](v0.12.0...v0.13.0)
(2026-10-29)


### Features

* **gh:** devops gh issues close records the close reason and a comment
([#2575](#2575))
([97ed0ea](97ed0ea)),
closes [#1658](#1658)
* **monitoring:** the ai spend dashboard counts gateway traffic from the
gateway's own series, shows failed attempts and names each caller
([#2584](#2584))
([33491ca](33491ca))
* **roadmap:** refine writes each criterion as an OpenSpec requirement
([#2591](#2591))
([d9a869f](d9a869f))
* **sandbox:** sandbox commands take a seccomp profile file
([#2588](#2588))
([46958d4](46958d4))


### Bug Fixes

* **monitoring:** RoadmapServiceGitHubWritesHigh counts a request with
no method label as a write, so it fired on 341 reads
([#2583](#2583))
([6dc3aa7](6dc3aa7)),
closes [#2574](#2574)


### Performance Improvements

* **ci:** the gate writes no coverage XML, and the clean-up keeps the
combined data
([#2582](#2582))
([ae9ebb2](ae9ebb2)),
closes [#1743](#1743)
* **roadmap:** intake's embeddings are cached in a password-protected
Valkey in the cluster
([#2578](#2578))
([bfe8a0c](bfe8a0c))


### Code Refactoring

* **devcontainer:** remove the DEVOPS_CLI_SKIP_TOOL_BOOTSTRAP test
switch from product code
([#2580](#2580))
([7e7272e](7e7272e))
* **lint:** lazy exports import names under TYPE_CHECKING
([#2590](#2590))
([c96dbfe](c96dbfe)),
closes [#2010](#2010)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.

perf(ci): the local gate writes coverage XML only where CI reads it, and the cleanup keeps the combined data

1 participant