Repository navigation
refactor: move the resolution methods into a RevisionManager mixin, completing the package split (ROADMAP.md #73) - #94
Conversation
…OADMAP.md #73) Completes the track_changes package split: manager.py keeps only the RevisionManager class header and __init__, and the 21 accept/reject methods move verbatim into _ResolutionMixin. base.py gains six stubs for the cross-cluster callees the cluster reaches (_find_revision_element, list_revisions, _unhandled_elements, group_revisions, changeset_groups, _paragraph_mark_rPr). scripts/check_pure_move.py --base main: 3/3 ok.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change extracts revision accept/reject behavior from ChangesRevision resolution
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to This PR reorganizes existing revision-resolution methods behind the same RevisionManager façade without identified behavior, access, or dependency changes; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
========================================
+ Coverage 80.6% 97.9% +17.3%
========================================
Files 22 23 +1
Lines 5132 5136 +4
Branches 991 991
========================================
+ Hits 4137 5033 +896
+ Misses 809 49 -760
+ Partials 186 54 -132 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
The last cluster of
RevisionManagermoves out ofmanager.py: the 21accept/reject methods become
_ResolutionMixinin a newtrack_changes/resolution.py.manager.pygoes from 721 to 74 lines — a moduledocstring, ten imports, the class header and
__init__— and the package splitstarted in #83 is complete: eight cluster modules behind an unchanged façade.
Why
track_changes.pywas 5,215 lines and every review round found real bugs in it.Resolution was the last cluster still sharing a file with the class it belongs
to, so a fix there could not be reviewed without the whole manager in view. Two
filed bugs (#75 author-filtered bulk resolution, #79 split formatting) were
explicitly waiting on their cluster to move.
How
A pure move:
resolution.pyis the oldmanager.py:87-721byte for byte undera mixin header, so
git diffshows no logic change.base.pygains six stubsfor the cross-cluster callees the moved code reaches (
_find_revision_element,list_revisions,_unhandled_elements,group_revisions,changeset_groups,_paragraph_mark_rPr), each a verbatim copy of its real signature; no existingstub became unreferenced. Start at
manager.pyfor the assembled base list.Testing
scripts/check_pure_move.py --base main:Full suite: 1857 passed, 8 skipped, 2 xfailed.
resolution.pyis at 100% —219 statements, 104 branches, none missed — after a new test covers rejecting a
w:pPrChangeplaced outsidew:pPr; without the guard it pins, that pathstrips the paragraph's own properties and runs.
ruffclean,tyat its7-diagnostic baseline.
Summary by CodeRabbit
New Features
Bug Fixes