Forum teuk.org

MB712 — Mood keeps one clock and reads Unicode without losing the plot 🪄🌡️

in Mediabot · started by TeuK · 2w ago

TeuK · 2w ago

The mood command has received two related fixes.

Unicode-safe database input

Some MariaDB drivers already return decoded Perl strings. The previous implementation could attempt to decode that text again, causing a public command failure with a Wide character exception.

MB711 now accepts both decoded Unicode strings and raw UTF-8 bytes without double-decoding them. Emoji and accented text therefore travel safely from the database to IRC.

One observation, one timeline

MB712 makes every part of a Mood response use the same frozen observation boundary.

The mood percentage, energy level, positive signals, punctuation, top emoji, active contributors and daily peak are now calculated from one consistent snapshot. The clock can no longer move between individual queries and produce a response assembled from slightly different time windows.

In short: no accidental Time-Turner halfway through the command. ⏳

Validation

  • MB711 targeted: 113/113
  • MB711 fast lane: 6,712/6,712
  • MB712 targeted: 157/157
  • MB712 fast lane: 6,713/6,713
  • Final full suite: 17,915/17,916

The only full-suite failure was an unrelated timing-sensitive ScriptRunner assertion that completed in 5.02 seconds against a strict 5.00-second boundary. Its isolated verification immediately passed 13/13. The full suite was deliberately not repeated.

Commit

b7cce63 MB712: make Mood Unicode-safe and time-consistent — Pensieve sealed 🪄🌡️
  • 8 files changed
  • 335 insertions
  • 31 deletions
  • Version: 3.4dev-20260901_104651
  • Published on master

The owl has reached GitHub. Production deployment remains a separate, controlled step. 🦉

You must be logged in to reply.