Skip to content

Define and enforce realistic coverage budgets for unit, integration, and e2e lanes #98

@CodeMonkeyCybersecurity

Description

Summary

The #291-#294 patch set wires the test pyramid more cleanly, but the repository still lacks an enforceable, transparent coverage policy that maps to the desired unit/integration/e2e split.

Evidence

  • The current CI lanes are separated (unit, integration, e2e-smoke, e2e-full, fuzz), but the repo does not yet have a single accepted coverage contract for these lanes.
  • Targeted package coverage after the patch remains uneven across large packages, so a generic “90%+” claim would be misleading without agreed measurement rules.

Why this matters

  • Teams will optimize whatever is measured. Right now lane wiring exists, but the coverage target is not operationalized.
  • Without explicit budgets, future contributors can unintentionally shift coverage away from the intended test pyramid.

Proposed work

  1. Define the measurement scope: repo-wide, changed-package, or changed-line coverage.
  2. Publish budgets for each lane, for example unit as the primary coverage source with integration/e2e focused on contract and workflow confidence.
  3. Emit machine-readable coverage summaries per lane and fail CI when agreed thresholds regress.
  4. Add documentation so local npm run and CI use the same definitions.

Acceptance criteria

  • Coverage policy is documented in-repo.
  • CI reports lane-specific coverage metrics in a stable format.
  • Threshold regressions fail predictably and do not depend on local tool quirks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions