Skip to content

test(coverage): enforce branch-aware 90% policy - #1143

Merged
doublewhy merged 1 commit into
devfrom
1104-minimal-coverage-policy
Aug 13, 2026
Merged

test(coverage): enforce branch-aware 90% policy#1143
doublewhy merged 1 commit into
devfrom
1104-minimal-coverage-policy

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Summary

Replace the superseded coverage design from PR #1139 with a minimal branch-aware policy: Coverage.py owns Python semantics, canonical verification enforces the repository’s fixed 90% aggregate line floor, and branch data remains visible without a manual ratchet or 100% changed-code gate.

Requirement UIDs

  • (none — bug/refactor/maintenance run; see Traceability section below)

Related Issues

Closes #1104

ADR Impact

  • ADR-103
  • ADR-014
  • ADR-015

Changes

  • Adopt ADR-103 to define coverage scope, the 90% line floor, branch visibility, and the ADR-015 accidental-regression trust boundary.
  • Measure repository-owned Python with Coverage.py branch collection and publish canonical XML and JSON reports.
  • Enforce line coverage directly from Coverage.py totals without a semantic diff checker or manual ratchet.
  • Allow requirement-free quickfix policy and hook paths to skip only requirement governance while retaining all repository checks.
  • Supersede the implementation approach proposed in PR test(coverage): require 100% coverage for changed Python code #1139.

Test Plan

  • Unit tests pass
  • Integration tests pass if applicable
  • Configured completion command passes
  • No coverage regression

Canonical quickfix verification and repository policy passed. The combined report measured 76,656 of 85,111 executable lines (90.066%) and 20,234 of 26,566 branches (76.165%).

Ground Control Checks

  • Configured repository policy command passes
  • Pre-push code review and test-quality review completed; all findings fixed or dispositioned

Traceability

  • IMPLEMENTS: ADR-103 ← implementations/python/pyproject.toml, ADR-103 ← noxfile.py, ADR-014 ← .github/workflows/ci.yml
  • TESTS: ADR-103 ← implementations/python/tests/test_repo_policy_tools.py

Checklist

  • Code follows the project's coding standards
  • Changelog: owned by Release Please (generated from the Conventional Commit PR title; no per-PR fragment)
  • Architectural docs updated if stack, package structure, or key behaviors changed

Documentation

Updated: see diff.

@doublewhy
doublewhy merged commit 8c9365c into dev Aug 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants