一键导入
fixing-diff-cover-failures
Use when make test-diff-coverage fails, CI reports diff coverage below 100%, or a GitHub PR is blocked on uncovered changed lines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when make test-diff-coverage fails, CI reports diff coverage below 100%, or a GitHub PR is blocked on uncovered changed lines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user confirms paste-ready PR materials, or asks for a PR title/body, commit message, or CHANGELOG entry after substantive pulp-tool repo changes.
Use when changing the Dockerfile, .tekton/ PipelineRuns, pulp-tool-container image, UBI/Python base, or Konflux container build integration. Container images are built by Konflux Tekton — not GitHub Actions.
Use when changing upload, global CLI flags (--config, --build-id, --namespace), --rpm-path, --parent-package, --sbom-path, --artifact-results, Tekton workspace paths, or Konflux downstream integration. Container image *build*: changing-pulp-container.
Use when pre-commit hooks fail repeatedly, lint errors persist after make format, or local checks disagree with CI on pulp-tool.
| name | fixing-diff-cover-failures |
| description | Use when make test-diff-coverage fails, CI reports diff coverage below 100%, or a GitHub PR is blocked on uncovered changed lines. |
GitHub merge requires 100% test coverage on the PR diff (branch vs base). Overall project coverage (e.g. 85%) is separate and does not unblock merge.
git fetch origin
make test-diff-coverage
# Non-main base: make test-diff-coverage COMPARE_BRANCH=origin/<base>
diff-cover (same signal as CI).make test (full suite), then make test-diff-coverage.Use python3 -m pytest --cov=pulp_tool --cov-report=term-missing only to debug specific files; make test-diff-coverage is the authoritative gate.
make test alone (without diff-cover)# pragma: no cover to avoid writing tests (only if truly unreachable and justified)| Excuse | Reality |
|---|---|
| "Overall coverage is high" | Merge gate is 100% on the diff only |
| "That line is hard to test" | Add a focused unit test or refactor for testability |
| "CI might pass anyway" | diff-cover locally matches CI; fix before push |
git fetch origin && ./scripts/check-all.sh