Repository navigation
feat(worker): respect custom patch target in PR comment indicator - #1380
Open
yuvalgnessin-qz wants to merge 1 commit into
Open
yuvalgnessin-qz wants to merge 1 commit into
yuvalgnessin-qz wants to merge 1 commit into
Conversation
The comment's patch line hardcoded the checkmark to 100% patch coverage, so a team that sets a custom coverage.status.patch target still saw a red X in the PR comment even when the codecov/patch status check passed. Reflect the configured default patch target (and threshold) when choosing the patch-line indicator, so the comment agrees with the status check. An auto/unset target keeps the historical 100%-only checkmark, so existing comments are unchanged. Scoped to HeaderSectionWriter; TeamPlanWriter intentionally ignores yaml config and is left as-is. Co-Authored-By: Claude Opus 4.8 <[email protected]>
yuvalgnessin-qz
marked this pull request as ready for review
July 1, 2026 20:27
This branch has not been deployed
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.
I originally reported this in codecov/feedback#54 (comment)
The solution is AI-generated and so is the PR Summary below. If that's against the policy, I totally get it - feel free to close.
AI Below
Make the PR comment's patch-coverage indicator respect a custom
coverage.status.patchtarget instead of hardcoding the checkmark to 100% patch coverage.Problem. The comment's patch line shows ✅ only when there are zero missed/partial lines in the diff (
HeaderSectionWriter,sections.py—if misses_and_partials:). A team that sets, say,coverage.status.patch.default.target: 90%gets a passingcodecov/patchcheck but still a red ❌ in the comment at 91% patch coverage. Reported in codecov/feedback#54.Change. When a custom patch target is configured and patch coverage meets it (respecting
threshold), the comment's patch line shows ✅ (and still reports the count of lines missing coverage).auto/unset targets keep the historical 100%-only checkmark, so existing comments are unchanged. This mirrorsStatusPatchMixinso the comment agrees with the status check.Scope.
HeaderSectionWriteronly.TeamPlanWriterintentionally ignores yaml config (patch-only lightweight plan) and is left as-is.Tests. Added two
TestNewHeaderSectionWritercases (custom target met → ✅; not met → ❌).ruff checkandruff formatpass.Refs: codecov/feedback#54
Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.