Replace watchlist match reasons with MatchReason enum#60
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughReplaces string match reasons with a new ChangesMatch Reason Type Safety
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai help |
ChatThere are 3 ways to chat with CodeRabbit:
CodeRabbit commands
Other keywords and placeholders
CodeRabbit configuration file (
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Summary
Replace bare
"author"/"paper"match-reason strings with a typedMatchReason(str, Enum)in the watchlist match pipeline. Producers,PerUserMatches, and tests now use enum members; Slack tags usereason.valuefor display.Changes
models.py: AddMatchReason(AUTHOR,PAPER); typePerUserMatchestuples asMatchReason.storage.py:matches_for_users()emitsMatchReason.AUTHOR/MatchReason.PAPER.scout.py:notify_users()formats tags withreason.value(Python 3.14-safe).test_monitor.py,test_scout.py,test_storage.py— imports and tuple literals updated.Out of scope: DB watchlist
entry_typestrings and Slack watchlist UI labels.Acceptance criteria
MatchReasonenum inmodels.pyPerUserMatchesusesMatchReason.valuefor displayTest plan
./run cov— 360 passed, 94% coverage./run checkin CIRelated
Summary by CodeRabbit
Refactor
Tests