Skip to content

Add coverage summaries per production Bazel target #11

Description

@AlexanderLanin

🎯 Motivation

The global coverage result is too coarse to identify weak production components. The file-level HTML report is too detailed and requires consumers to aggregate files manually.

LCOV is only raw coverage data and does not contain file/line justifications. It therefore cannot represent the effective coverage status and is unsuitable as the consumer-facing target-level result; it should remain available as a low-level diagnostic.

A production-target view would make coverage status easier to assess, communicate, compare, and integrate into dashboards or release evidence.

💡 Proposal

Add coverage summaries per production Bazel target, based on the union of all relevant tests and including the effect of applied justifications.

🖥️ Human-readable

Provide an HTML overview with:

  • target label and understandable status;
  • raw/effective line and branch coverage;
  • covered, uncovered, and justified counts;
  • links to the existing file-level details.

🤖 Machine-readable

Provide a stable, self-contained format with the same target-level information, including raw/effective counts and percentages, plus enough justification information to explain the effective values. Existing global and low-level file outputs remain available.

❓ Open semantics

  • Direct target sources only, or transitive production dependencies?
  • How are files shared by multiple targets assigned or counted?
  • How are declaration-only, no-data, and similar files handled?
  • One schema across all supported coverage backends.

✅ Acceptance criteria

  • Target-level effective coverage is available in HTML and machine-readable form.
  • Coverage from all tests is merged before aggregation.
  • Justifications are reflected and explainable in the effective values.
  • HTML links to file-level details.
  • Shared-file and dependency semantics are documented and tested.
  • LCOV remains available as raw low-level coverage data, but is not required to encode justifications.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions