-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coretasks: Major rewrite of MODE handling #1575
Conversation
It appears (as observed on a real bot in production) that batched MODE messages would trip up the old code and assign incorrect privilege bitmasks depending on the ordering and other factors. This rewrite is a first attempt at fixing that. Notably, it specifically bails out if something looks too complicated to parse. Co-authored-by: mal <mal@sec.gd>
520d2fd
to
78b5878
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great to see a bug fix with some unit-tests! However, I'd like to prevent what I call the "too smart" syndrome.
Tests are dumb things, KISS and DRY are nice, but they mostly don't apply to them. I prefer a test that repeats itself than a test that, by being too smart or too clean, misses its target.
For instance, a SopelWrapper
instance is never used multiple times for different Trigger
: there is one and only one per Trigger
. The same SopelWrapper
can be used in multiple commands, but that's another thing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: Florian Strzelecki <florian.strzelecki@gmail.com>
a164bbc
to
c651804
Compare
Opening this PR early as a draft, to gather feedback from @half-duplex (who reported a possible mode-tracking bug in the 6.6.x series to me) and others who might have more spare time and/or brainpower this weekend than I seem to (so far). 😅
If this turns out to be a productive rewrite, it's a solid reason to release a version 6.6.7 (which is not currently planned). Should it not help anything, I mean what I said in that comment about rewriting the mode tracking again after ISUPPORT parsing (#1536) gets finalized and merged for Sopel 7.