codecov / feedback

A place to discuss feedback about the pull request and web product experience.
37 stars 7 forks source link

Improved Patch Coverage Validation and Reporting #583

Open vlad-ko opened 3 days ago

vlad-ko commented 3 days ago

Summary:
Enhance Codecov's reporting capabilities to ensure customers can verify that patch coverage for a given pull request (PR) is calculated correctly. This feature will provide clear visibility into whether all files present in the Git diff for a PR have 1) received a coverage report and 2) been successfully processed.

Problem Statement:
Many of our customers primarily focus on patch coverage rather than the overall monorepo coverage. Currently, it is challenging to validate whether patch coverage is being calculated accurately, because the customer doesn't know if they missed an upload due to internal sharding of test suites. There is no straightforward way to confirm if all files in the Git diff for a PR are accounted for in the coverage report and whether the report has been processed correctly. This lack of clarity can lead to mistrust in the coverage metrics or missed opportunities to address gaps in test coverage.

Proposed Solution:
Introduce a feature that allows users to verify the following for a given PR:

  1. File Coverage Status: Identify all files in the Git diff for the PR and check if they have been included in the coverage report.
  2. Processing Confirmation: Confirm that the coverage report for each file has been successfully processed without errors.
  3. Detailed Feedback: Provide a detailed summary or diagnostic view highlighting any missing files, unprocessed reports, or other anomalies affecting patch coverage.

This could be implemented as a new section in the PR comment or a standalone endpoint in the Codecov API.

Use Case(s):

  1. A customer submits a PR and wants to ensure that all files in the Git diff have test coverage accounted for.
  2. Debugging cases where patch coverage seems unexpectedly low due to missing or unprocessed reports.
  3. Teams working with monorepos who need to focus on specific patches without being distracted by irrelevant coverage data.

Benefits:

Additional Context: