This one feels good.
After a long series of hardening rounds, schema cleanups, live-test fixes, Debian 13 compatibility work, and a few very stubborn edge cases, Mediabot v3 is now passing the full static test suite and the full live IRC test suite.
No hand-waving. No “it starts on my machine”. No “the bot seems fine”.
This round validates the project from several angles:
Mischief managed. The bot lives, answers, restarts, and survives the tests. ✨
The latest full validation run reached the target we wanted:
100% of the relevant static and live tests passed.
The live test suite validates real bot behavior, not just isolated code paths. During the run, Mediabot successfully:
That last part matters a lot: the bot is not merely passing static checks, it is behaving correctly as a long-running IRC service.
Several static tests were failing not because the bot was broken, but because the tests had fallen behind the code.
This round fixed that properly instead of weakening coverage.
The Claude callback test now checks the right file for the Partyline command implementation.
_cmd_ai lives in:
Mediabot/Partyline.pm
not in:
Mediabot/External.pm
The test now reflects the actual architecture:
claudeAI() lives in External.pm;Partyline.pm;The karmahist regression test was also adjusted to match the real implementation.
The code correctly keeps a per-channel in-memory ring buffer capped at 20 entries:
splice @$klog, 0, @$klog - 20 if @$klog > 20;
The test now validates that behavior directly instead of looking for an obsolete textual shape.
A few media-related tests were updated to match recent improvements:
get_tmdb_info();main.YT_SEARCH_RESULTS;That keeps the tests meaningful while allowing the implementation to evolve.
The most important work was in the live test suite.
The bot had already been behaving correctly, but the tests were still assuming older routing behavior in a few places.
Mediabot now routes help output by NOTICE to avoid flooding channels.
The live tests were still expecting some !help responses as public PRIVMSG channel output. That was wrong.
The tests now validate the intended behavior:
!help → NOTICE to the requesting nick
This matches how the bot actually behaves and keeps public channels cleaner.
Commands such as:
!q
userinfo
whoami
help foobar
can produce multiple NOTICE lines.
The live tests now drain those lines properly before moving to the next assertion. This prevents one command’s leftover output from polluting the next test.
That was one of the main causes of false negatives.
The Partyline restart test now confirms the full restart cycle:
.restart;This is a serious runtime test. It validates restart behavior in conditions close to real operation.
The project now has a cleaner database story.
The reference schema is:
install/mediabot.sql
Existing installations should use migrations from:
install/migrations/
and validate the result with:
perl tools/check_schema_drift.pl --conf=mediabot.conf --strict
The checker was also made more Debian 13 friendly:
DBD::mysql when available;DBD::MariaDB when that is what Debian provides;port= usage with DBD::MariaDB and localhost;SET NAMES utf8mb4 instead of fragile driver-specific attributes.This means the schema drift checker now works in the kind of environment a fresh Debian 13 install actually provides.
The old live-test schema file has been removed from the workflow.
Instead of maintaining a second schema just for tests, live tests now load:
install/mediabot.sql
then apply a small fixture file:
t/live/fixtures.sql
That is the right model:
This already helped with recent additions such as:
REMINDERS;BOT_ALIAS;KARMA;USER_SEEN;CHANNEL_BAN;The Claude integration is now better framed for real use:
[anthropic] is documented in mediabot.sample.conf;Claude chanset exists in the main schema;This prevents the AI command from being a mysterious hidden feature. It is now part of the documented configuration and schema model.
This round touched several important areas:
| Area | Result |
|---|---|
t/cases/ |
Static tests aligned with current code |
t/live/ |
Live tests made robust against NOTICE output and multi-line replies |
t/test_live.pl |
Uses the real schema plus fixtures |
tools/check_schema_drift.pl |
Debian 13 / MariaDB compatibility hardened |
install/mediabot.sql |
Schema aligned with current features |
install/migrations/ |
Existing DB upgrade path documented |
mediabot.sample.conf |
Anthropic / Claude configuration documented |
Partyline restart test |
Validates real restart and reconnect behavior |
This is more than “some tests passed”.
For a long-lived IRC bot, the hard parts are not always the flashy features. The hard parts are:
This round moves Mediabot v3 much closer to that standard.
The bot now has a stronger base for future work:
This was one of those rounds where the last few failures were not dramatic, but they mattered.
A fragile test suite can hide real bugs. A noisy test suite can also waste time chasing ghosts.
Now the tests match the actual bot behavior much better.
Mediabot connects, answers, authenticates, restarts, reconnects, and passes.
Finite Incantatem. Mischief managed. 🪄
You must be logged in to reply.