fix: unmute members when their mute expires - #194
Open
ToxicBiohazard wants to merge 2 commits into
Open
ToxicBiohazard wants to merge 2 commits into
ToxicBiohazard wants to merge 2 commits into
Conversation
The scheduler treated second-based deadlines as milliseconds and then slept inside the loop, so a long ban blocked every automatic unmute. Co-authored-by: Cursor <cursoragent@cursor.com>
ToxicBiohazard
requested review from
dimoschi and
makelarisjr
as code owners
September 29, 2026 01:22
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #194 +/- ##
==========================================
+ Coverage 66.60% 69.36% +2.75%
==========================================
Files 54 54
Lines 3177 3215 +38
==========================================
+ Hits 2116 2230 +114
+ Misses 1061 985 -76 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov rejected the patch because the new scheduler and unmute branches were untested. Co-authored-by: Cursor <cursoragent@cursor.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that apply.Proposed changes
Automatic unmute never ran.
unmute_timeandunban_timeare stored as Unix seconds, but the scheduler compared them to a millisecond cutoff, so every mute and ban matched, including permanent bans of about 500 weeks. The job then slept insideschedule()until the furthest deadline, and unbans run before unmutes, so a long ban blocked every unmute./mutealso started its unmute task without keeping a reference. On Python 3.13 the event loop only holds a weak reference, so that sleeping task could be garbage-collected and never fire.This change:
/mute.Checklist
Put an
xin the boxes that apply.doc.
Additional context
Covered by
tests/src/cmds/automation/test_scheduled_tasks.py: a far-future ban does not block scheduling, and an expired mute is cleared while a mute still hours away is left in place.Made with Cursor