apertium/phenny

.more acts buggy and doesn't give more

Closed this issue · 5 comments

begiak offered to give more messages using .more

(23:53:41) begiak: apertium-lat: jonorthwash [ 5aa21ef fa3ea87 cdf38d6 063c032 3fdb568 c0f7b33 27681a2 8711ea8 4efba53 84f1d06 e8bb559 08d0be0 1f07806 293c0f3 71c31fb 33ab0f2 3b315ce 0587499 367bfee c425fbb a9a2b84 28b7a3d d374e3b e443ea5 b0e71bc 9d35850 2d786af 5251251 595f2d6 8553267 fe2be3f 83ffe01 d0d6325 01954bd d97cde6 d3c1108 6f29e31 16b802a d7a106b 9f4e41e 0f29194 f9137cb 2e0eb0e 235f155 a08cfb1 d9efacc db58612 607b432 569eded 378693f
(23:53:42) begiak: Please type ".more" to view remaining messages.
(23:54:09) firespeaker: .more

Nothing else was reported by begiak in the channel, but I did get the following pm:

(23:54:18) begiak: ...

Seems to be #431 (comment).
I have no clue why begiak would respond in private here...

begiak sends debug info to admins. I only get them after they've gone around some already, so I receive "..." instead of the debug message, due to throttling stuff. It'd be good if we could fix that—there's no reason to throttle (or whatever) this way. Perhaps a separate bug for that, and this one is for the .more issue.

I've looked at the truncating / throttling stuff already but couldn't really find anything suspicious.
Only that break_up called with max_count could have an unnecessary stray "..." at the end.
Should be fixed in 4e4914d#diff-6aa7aa8d27989b54139a1beea67cad9dR160 but if that was to occur, there would have been other messages directly before it (on the same channel).

Grepping tells that the only relevant places that have "..." hardcoded are:

  • Loop Detection (irc.py)
    • Replaces 5-fold-duplicates by "..." (except "..." itself)
  • break_up (tools.py)
    • Splits the messages and if max_count is passed, truncates the last line and amends "..."
    • used in irc.py as a catch-all with max_count=3
    • used in more.py without max_count
  • truncate (tools.py)
    • If necessary, truncates the message and amends "..."
    • used in git.py

git.py sends messages to a list of channels, mediated via more.py.
The .more command (if used on channels) is restricted to admins.
It first checks private messages and if there are none, checks channel messages.
See 4e4914d#diff-e8c61ad82683d48ec40ed06c44211f27R69.
This could be an alternative explanation to error reports ("debug info") being sent to admins.

Loop Detection should be fixed in 008fd6f.
I think all causes should be covered now.