Repository navigation
feat(ci): changed-line coverage on pull requests (diff-cover) - #1511
Merged
dan-petty merged 1 commit intoOct 9, 2026
Merged
Conversation
This was referenced Oct 9, 2026
Merged
dan-petty
added a commit
that referenced
this pull request
Oct 9, 2026
* fix(k8s): k8s-monitoring collectors run in the chart's preset shapes, and node-exporter keeps the series the node dashboards read (#1129) (#1500) * fix(security): the host sandbox declares a noexec /tmp it never applies (#798) (#1502) Bubblewrap has no noexec option for a tmpfs, so the host sandbox's `/tmp` was mounted executable while its policy declared `noexec`. The host sandbox now defaults to DEFAULT_HOST_SANDBOX_POLICY, which declares only the 64 MiB size. A policy with a tmpfs option bubblewrap cannot apply (`noexec`, or a size such as `size=50%` that is not in bytes) fails when the HostSandbox is constructed, with a SandboxValidationError naming the option, instead of being dropped. The size is parsed by docker.utils.parse_bytes in place of the hand-written regex. The container policy keeps noexec (#698). SECURITY.md says the host sandbox's `/tmp` allows execution. The output-cap test now runs a shell loop that ignores SIGPIPE, so closing the pipes does not end it, and asserts that the run ends within 1 s, under the reap's 1 s grace. The test fails if the kill at the cap is removed. * refactor(release): the release no longer pins, bumps or pre-publishes the service image tag; image updater rolls service:latest (#1486) (#1504) Argo CD Image Updater (#1485) keeps Application devops on the digest service:latest points at, so the custom tag process is gone: - The cut no longer bumps newTag in k8s/devops/kustomization.yaml or rewrites Argo CD targetRevisions, and stages nothing under k8s/. devops release check drops the pin and targetRevision checks; tests/test_k8s_argocd_apps.py already holds every git source on main. - k8s/devops/kustomization.yaml loses its images: pin. - release.yml has no release/v* trigger, plan or promote step. On main it builds, smoke-tests, scans, pushes by digest and attests the image, then tags it vX.Y.Z and latest. - ci.yml's Service Image job builds release pull requests too. - RELEASE_CYCLE.md, docs/ROUTINE_TASKS.md and k8s/README.md describe the new flow; the task files of #1451, #741, #1261 and #755 note what this removed. * fix(ci): ci's trivy scans run the trivy version tools.lock pins, so ci and local scans agree (#1499) (#1503) * fix(ci): review workflow tests start the logfire SDK's credential check, which the network guard blocks (#965) (#1505) * fix(security): URL and host:port reads use the sending client's parser (#1112) (#1506) * fix(ci): ci jobs run on a named ubuntu-24.04 runner and always use uv's managed python, never the runner's own python (#1494) (#1507) All nine runs-on selections name ubuntu-24.04 instead of ubuntu-latest, each with a comment linking #1501 (the move to ubuntu-26.04, which waits for actionlint to accept the label); codeql.yml's becomes a plain label. ci.yml and release.yml set UV_MANAGED_PYTHON: "1" at workflow level, so uv runs only its own CPython builds and never takes a runner image's own Python 3.14 for setup-uv's UV_PYTHON=3.14. UV_PYTHON_PREFERENCE is not also set: uv refuses to run with both. test_github_workflows_name_their_runner_and_use_managed_python in tests/test_ci.py fails on a -latest runner label and on a workflow that reaches setup-uv, directly or through a local composite action, without the setting. * fix(k8s): the ollama tier DaemonSets drop privilege escalation and capabilities, use RuntimeDefault seccomp and a read-only root filesystem, and run as non-root where the model directory allows (#1060) (#1508) * fix(git): GitHub clones trust GitHub's published host keys through OpenSSH (#1114) (#1510) * feat(ci): changed-line coverage on pull requests (diff-cover) (#850) (#1511) * fix(k8s): service URLs bracket IPv6 hosts and proxy boundaries (#1111) (#1509) * fix(security): URL and host:port reads use the sending client's parser (#1112) * fix(k8s): service URLs bracket IPv6 hosts and proxy boundaries (#1111) * feat(ci): shuffled repeat runs of a pull request's changed test files (#852) (#1512) * feat(ci): on-demand mutation testing of changed functions (`devops ci mutate`) (#853) (#1513) * feat(release): v0.2.32 * chore(release): collect the v0.2.32 changelog fragments (#1517) The Service's cut (198a273) bumped v0.2.32 without collecting the 13 fragments (#1450), so CHANGELOG.md's newest section was 0.2.31. This moves them into the [0.2.32] section before release PR #1516 merges. --------- Co-authored-by: Daniel Petty <[email protected]> Co-authored-by: dan-petty-bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests & Coveragejob runs a new advisory Changed-Line Coverage step after the gate step. It runs diff-cover 10.6.0 over the.data/coverage.xmlthe gate already writes, against the pull request's own base branch (origin/${BASE_REF}, withBASE_REFpassed throughenv). The report goes to the job summary, followed by anypragma: no coverlines the pull request adds undersrc, with their file names. The checkout now fetches full history (fetch-depth: 0) so the merge base is always found.--fail-underand is not a check row. No file undersrc/changes, souv run devops ciand the pre-push gate are unchanged.diff-cover==10.6.0is added to the dev group.uv.lockadds only diff-cover 10.6.0 and chardet 7.6.0.tests/test_ci.pyadds a test that parsesci.ymland checks the step's shape: it runs only on pull requests, takes the base ref through env, has no--fail-underand no${{in its script, the checkout has full history, and no check row runs diff-cover. The step also goes on the CI parity allowlist.RELEASE_CYCLE.md(Step 3 and the CI note),changelog.d/850.mdand the task file are updated.Backtest (last 10 merged
release/**PRs that changesrc, measured at each squash commit): #1488 92.4%, #1487 79.7%, #1484 70.4%, #1483 89.3%, #1482 n/a, #1481 97.0%, #1480 87.0%, #1479 78.3%, #1477 n/a, #1476 100%. Five of ten fall below 90. The D4 rule says to block only once fewer than 1 in 10 PRs would fail, so the step stays advisory. The task file records the rule and the full table.Deviations from the issue
config/constants.py. Nothing would read it while the step is advisory, and the blocking threshold is[tool.coverage.report] fail_under, so a constant would duplicate it.ROADMAP.md:1010marking.docs/ROADMAP.mdis generated and the entry no longer exists. If the vanished-test report is still wanted, it needs its own issue.code_coverageruleset rule is an owner settings step, the same one chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842 already lists ("withoutcode_coverage"). The task file repeats the commands.Known gaps
Tests & Coverageis not yet a required check on either ruleset (chore(github): required CI checks bind merges into release and main, and ADR 0004 records the verification policy #842's owner step), so a future blocking step would block nothing until that lands.workflow_dispatchruns skip the step, and so does any run whose gate step fails.Closes #850
Test plan
test_changed_line_coverage_step_is_advisory_on_pull_requestsfailed before the workflow change and passes after ituv run pytest -n 0:tests/test_ci.py,tests/test_agent_task_files.py,tests/test_docs_knowledge_base_argv.py,tests/test_release_changelog_fragments.pyandtests/test_architectural_invariants.pyci.ymluv lock --checkanduv auditpass (no vulnerabilities in 216 packages)uv run devops ci --only actionlint,audit,uv-check,lockfile,deps,docs,lint,formatpassesuv run ruff checkanduv run ruff format --checkpass on the changed test filebash -eo pipefail, writes a summary headedDiff: origin/release/v0.2.32...HEADand lists an added pragma line with its file. The script took under 1 s, and diff-cover took 0–3 s per commit in the backtestTests & Coveragerun summary showsDiff: origin/release/v0.2.32...HEAD(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_coveragefrom rulesets 21466414 and 23059172 withgh 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.json