fix(quality): restore 100% python branch coverage on protected main - #223
Conversation
The consolidation merge landed check_coverage.py with load_union_branch_totals defined twice; the shadowed first definition was unreachable dead code that dropped the Python gate to 91% and blocked every future PR. Remove the duplicate, keep the test-exercised definition, and add direct tests for the remaining arcs: valid cross-binary count merging, blank-history reverse-scan exhaustion, and escaped-backslash char literals inside the multiline-string scanner.
|
Warning Review limit reachedNext included review available in 35 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
📝 Info: load_union_branch_totals is test-only
The remaining load_union_branch_totals is referenced only by tests. The production gate load_totals (check_coverage.py) uses fold_unique_branch_totals instead, so this function does not affect live gating.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
scripts/check_coverage.pywith two definitions ofload_union_branch_totals; the shadowed first copy (lines 43–76) was unreachable, dropping the repository Python branch-coverage gate to 91% and failing theRepository contracts and Python branch coveragerequired check for every subsequent PR.load_union_branch_totalscount merging across duplicate instrumented copies (loop-back + aggregation body);Verification
python3 -m coverage run --branch -m unittest discover -s tests/quality -p 'test_*.py'→ all tests passpython3 -m coverage report --fail-under=100→ TOTAL 100%python3 -m pytest tests/quality -q→ 150 passedCloses the protected-main coverage regression introduced by #215.