fix: recompute global leaderboard tags on post approval#4974
Conversation
Global leaderboard tag computation depends on each question's open_time and scheduled_close_time. For newly created posts (in particular duplicated ones, whose timing fields the frontend clears) these fields are null at create time, so the tag pass in create_post produces no tags. Approval finalizes the times but did not re-run the tag pass, leaving duplicated posts without a global leaderboard tag until another lifecycle transition (close/resolve/unresolve) triggered a recompute. Co-authored-by: aseckin <aseckin@users.noreply.github.com>
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@lsabor would appreciate a review |
Closes #1820.
Summary
approve_postnow callsupdate_global_leaderboard_tagsafter finalizing each question's timing fields, so duplicated (and any newly-created) posts get their global leaderboard tag attached at approval time instead of waiting for a close/resolve/unresolve recompute.Test plan
pytest tests/unit/test_posts/test_views.py::test_approve_post__updates_global_leaderboard_tagsGenerated with Claude Code