Repository navigation
Description
Context & Rationale
Coverage is gated only in total: fail_under = 90 (pyproject.toml:113), with no branch coverage. The total sits at 90.4-91%, so an untested new function inside a well-covered module passes every gate.
The data already exists and nothing reads it:
- CI writes
.data/coverage.xml(ci.yml:97,pyproject.toml:125). - Both rulesets carry a
code_coveragerule (minimum 90, maximum drop 5) that nothing feeds.
Matching symbols to test names does not work here. 694 of 2,754 public symbols are never named in a test, mostly Typer commands tested through CliRunner. An exemption marker would also collide with #602.
This item is docs/ROADMAP.md:1010 rescoped. Per :1013, the local gate has no reliable PR base on release/**.
Scope & Deliverables
- Deliverable:
- Add diff-cover (10.6.0, 2026-09-22, Python 3.10-3.14) to the dev group.
- In the Tests & Coverage job, for
pull_requestevents only:- fetch the base ref with enough history to find the merge base;
- after pytest, run
diff-cover .data/coverage.xml --compare-branch=origin/<base ref>, with the ref passed throughenv; - write the result to
$GITHUB_STEP_SUMMARY, and list any addedpragma: no coverlines.
- The step is advisory at first, with no
--fail-under. The task file records a backtest over the last 10 merged PRs and the threshold at which the step becomes blocking. That threshold lives as a constant inconfig/constants.py. - Mark
ROADMAP.md:1010rescoped. Its vanished-test report stays for triage.
- Acceptance criteria:
- On a PR into
release/**, the summary shows coverage measured against that release branch. uv run devops ciis unchanged.- A test parses
ci.ymland asserts that the step runs only onpull_request, uses the base ref, and has no--fail-underwhile it is advisory. - actionlint,
uv lock --checkanduv auditpass. - The step adds under 15 s to the job.
- On a PR into
- Key questions:
- Should we rely on GitHub's native rule instead? (proposed) No: use diff-cover, and remove the native rule unless something feeds it.
- When does the step become blocking? (proposed) When the backtest shows that fewer than 1 in 10 PRs would fail.
- Constraint:
- Never part of the pre-push gate.
- Coordinate the
ci.ymledits with the CI-parity item.
Strategic Alignment
- Milestone: Backlog
- Depends on: none
Owner decisions (2026-10-01)
From the agentic quality assessment (https://claude.ai/artifact/K7S7AkKJymFydhjwexigiN), decided by the owner. These replace any matching proposed answer above.
- D4, the tool. Use diff-cover in the CI test job, reading the coverage.xml CI already writes, against the PR's own release/** base. It stays advisory until a 10-PR backtest picks a threshold, then blocks at the
fail_undervalue. Remove the nativecode_coverageruleset rule unless something feeds it, because a rule that is configured but inert looks like enforcement.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 8, 2026
Placed in v0.2.32 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: URLs and host keys read by the library that dials, ollama hardening, and pull-request test-quality tooling. Position 7 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
feat(ci): changed-line coverage on pull requests (diff-cover) (#850) (#…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1511, merged into
release/v0.2.32as cc3bae8.7 file(s) changed.
How it was verified
Check runs at 67385fc:
Acceptance Criteria of
docs/agent/tasks/task-850-changed-line-coverage-on-pull-requests.md:release/**, the summary measures coverage against that release branch. The step runs diff-cover with--compare-branch="origin/${BASE_REF}", andBASE_REFisgithub.base_ref. Run locally underbash --noprofile --norc -eo pipefailwithBASE_REF=release/v0.2.32, the step's script wrote a summary headedDiff: origin/release/v0.2.32...HEAD, and it listed an addedpragma: no coverline under its file name.uv run devops ciis unchanged: nosrcfile changes, and no check row runs diff-cover.test_changed_line_coverage_step_is_advisory_on_pull_requestsintests/test_ci.pyparsesci.ymland asserts that the step follows the gate step, runs only onpull_request, takes the base ref throughenv, reads.data/coverage.xml, writes the summary and the pragma list, and has no--fail-underand no${{in its script. It also asserts that the checkout fetches full history and that no check row runs diff-cover._validate_ci_workflow_parity) allowlists the step as an advisory report that is never a check row.uv lock --checkanduv auditpass.Tests & Coveragerun summary showsDiff: origin/release/v0.2.32...HEAD, followed by the "Added pragma: no cover lines" section.gh pr checks <pr>, then open theTests & Coveragerun's Summary page (gh run view <run-id> --web).gh api repos/dan-petty/devops-cli/actions/jobs/<job-id> --jq '.steps[]|select(.name=="Changed-Line Coverage")|[.started_at,.completed_at]'code_coverage"): remove the inertcode_coveragerule from rulesets 21466414 and 23059172, since nothing feeds it.gh api repos/dan-petty/devops-cli/rulesets/<id> --jq '{name,target,enforcement,conditions,bypass_actors,rules:[.rules[]|select(.type!="code_coverage")]}' > /tmp/rs.json && gh api -X PUT repos/dan-petty/devops-cli/rulesets/<id> --input /tmp/rs.jsonfeat(release): v0.2.32 (#1516)