Forum teuk.org

πŸ† MB666 β€” The Sorting Hat Crowns the Channel's Finest Voices

in Mediabot Β· started by TeuK Β· 5d ago

TeuK Β· 5d ago

Version: 3.4dev-20260818_125953
Commit: 9701832

Mediabot already knew how to remember a channel.

With MB666, it starts celebrating the people who make that history worth remembering.

🎩 New command: awards

m awards
m awards 7d
m awards 30d

The command looks at recent channel activity and produces a compact set of community awards.

Current categories include:

  • πŸ—£ Top Voice β€” most active participant
  • πŸŒ™ Night Owl β€” most active during the night
  • ✨ Karma Magnet β€” strongest positive karma
  • 🎁 Generous Soul β€” most positive karma given
  • πŸ“œ Archivist β€” most quote contributions
  • πŸ“š Lorekeeper β€” most factoid contributions

Example from the development channel:

πŸ† #radiocapsule Awards β€” last 7 days
πŸ—£ Top Voice: Balibalo β€” 168 msgs Β· πŸŒ™ Night Owl: Balibalo β€” 47 night msgs

And over 30 days:

πŸ† #radiocapsule Awards β€” last 30 days
πŸ—£ Top Voice: Balibalo β€” 672 msgs Β· πŸŒ™ Night Owl: Balibalo β€” 203 night msgs

🧠 More than another leaderboard

leaderboard answers a simple question:

Who is first?

awards tries to answer something more social:

Who played an interesting role in the channel recently?

Someone does not need to be the most talkative person to become the Night Owl, the Karma Magnet, the Archivist or the Lorekeeper.

That is exactly the direction Mediabot is taking: connecting the information it already knows instead of multiplying isolated commands.

βš™οΈ Designed to stay bounded

MB666 was implemented with strict limits from the start.

The command accepts only 7-day and 30-day windows.

Internally it uses:

1 archive-aware CHANNEL_LOG gather
1 karma query
1 quote/factoid query

The work runs through the existing CommandAsync infrastructure and uses a 20-second parent-side cooldown.

There is deliberately:

no database schema change
no migration
no new configuration key
no ORDER BY RAND()
no unbounded historical scan

πŸ§ͺ Validation

The feature was tested both automatically and on the real development bot.

Focused regression:

PASSED : 107/107

Fast validation lane:

PASSED : 5189/5189
Runtime: 178s
RC=0

Both public windows were also validated live on #radiocapsule:

m awards
m awards 30d

πŸ”§ A stronger test suite on the way out

MB666 also exposed two brittle assumptions in older tests.

One test still relied on a hard-coded TAP assertion total. It now derives that total dynamically.

Another encoding guard caught raw UTF-8 punctuation mixed with Perl wide-character escapes. The visible IRC output is unchanged, but the implementation now respects the existing encoding contract.

Those failures were annoying during development, but they left the project with better regression protection than it had before the feature was started.

πŸ—ΊοΈ Where this fits

Recent rounds have progressively connected more of Mediabot’s existing knowledge:

  • MB664 brought back random pieces of channel history with memory.
  • MB665 connected profiles to quotes and factoids through durable identity.
  • MB666 turns activity, karma and community contributions into social awards.

The goal is no longer to add commands for the sake of adding commands.

The goal is to make Mediabot feel like it actually knows the community it has been living with for years.

The Sorting Hat has spoken.

Now the channel gets its trophies. πŸ†

You must be logged in to reply.