Skip to content

ci: measure branch coverage and enforce 90% line coverage #1104

Closed

Description

@doublewhy

Gap Claim

Canonical verification records only statement coverage, enforces a 50% aggregate floor, and omits repository-owned Python entry points such as Nox and the Hatch build hook. The gate therefore does not represent the repository’s 90% line-coverage policy and provides no branch-coverage visibility.

Scope

OpenRAE implementation and repository tooling only. This is repository verification governance under ADR-014, not an implementation of ASR-505.

Chosen Architecture

Adopt ADR-103. Use Coverage.py as the authority for statement, exclusion, and branch semantics; measure shipped packages and repository-owned Python tooling; combine unit and integration data; enforce a fixed 90% aggregate line-coverage floor; and publish canonical XML and JSON reports containing branch data.

Do not add a manual ratchet, blanket 100% changed-code requirement, custom semantic diff checker, or adversarial hardening for repository-mutable policy. The threat model remains the accidental-regression boundary established by ADR-015.

Verification Plan

Test the branch-aware repository scope, canonical XML/JSON report commands, and the fixed line-only threshold. Run the canonical completion and repository-policy gates and verify the hosted Sonar quality gate.

Superseded Approach

PR #1139 established useful evidence for branch measurement and report scope, but its manual ratchet, 100% changed-code policy, and mutable-policy hardening are replaced by this narrower architecture.

Activity

  1. Brad-Edwards commented on Aug 13, 2026

    @Brad-Edwards
    Collaborator

    🛠️ Picked up by /implement - driver codex, branch 1104-minimal-coverage-policy, 2026-08-13T03:53:14.945Z.

  2. changed the title [-]ci: require branch coverage and 100% changed-code coverage[/-] [+]ci: measure branch coverage and enforce 90% line coverage[/+] on Aug 13, 2026
  3. Brad-Edwards commented on Aug 13, 2026

    @Brad-Edwards
    Collaborator

    Pre-PR base synchronization

    • Source: refs/remotes/origin/dev at 96b20ae8422fae9936bae928bbd8a1c14d2001da
    • Outcome: already_current
    • Published feature head: 4eec71455e6a6fe2d4bd725a97447413b51bc452
    • Verified tree: 8da55309532721bf4c2427b0da1ec2dfe5d93a77
  4. Brad-Edwards commented on Aug 13, 2026

    @Brad-Edwards
    Collaborator

    Quickfix close — issue #1104 complete

    PR: #1143

    Replaced the superseded PR #1139 approach with ADR-103 and a minimal Coverage.py-based policy: canonical verification now measures repository-wide Python branches, enforces the fixed 90% aggregate line floor, publishes XML and JSON, and keeps requirement-free quickfix policy gates valid without weakening repository checks.

    Files changed

    Added:

    • docs/decisions/adrs/adr-103-branch-aware-python-coverage-policy.md

    Modified:

    • .github/workflows/ci.yml
    • .gitignore
    • Makefile
    • docs/decisions/adrs/README.md
    • docs/decisions/adrs/adr-index.yaml
    • implementations/python/pyproject.toml
    • implementations/python/tests/test_repo_policy_tools.py
    • noxfile.py
    • tools/policy/historical_identity_records.json

    Status

    • CI: ✅ green
    • SonarCloud: ✅ passed
    • PR ready for user review and merge.
  5. doublewhy commented on Aug 13, 2026

    @doublewhy
    ContributorAuthor

    Completed by merged PR #1143 at merge commit 8c9365c. The accepted policy uses the maintainer-selected branch-aware 90 percent coverage gate; superseded PR #1139 is closed.

  6. removed
    in-progressAn agent is actively working this issue via /implement
    on Aug 13, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions