A new quality milestone has been reached for Mediabot v3.
After the recent work on the Partyline, DCC CHAT, CTCP CHAT, persistent channel bans, timed kickbans and ban levels, the project now has a stronger test framework to keep these features stable.
The goal is simple: stop relying only on manual IRC testing and logs, and start catching regressions earlier.
The test framework has been improved and extended with new regression tests around two sensitive areas:
Channel ban commands
DCC / CTCP CHAT handling
The current test suite now validates not only helper modules, but also command behavior and important regression cases.
This is especially important because Mediabot now performs actions that can affect real IRC channels:
MODE +b
MODE -b
KICK
DCC CHAT
CTCP CHAT
Partyline access
Those features deserve proper safeguards.
A new test file was added:
t/cases/09_channel_ban_commands.t
It validates the behavior of the new channel ban commands:
ban
kickban
kb
unban
bans
The tests check important safety rules:
level 74 cannot use ban commands
level 75 can use ban commands
dangerous masks are refused
ban levels above the actor level are refused
ban sends MODE +b
kickban sends MODE +b then KICK
unban sends MODE -b
bans lists active bans
This is a big improvement because the project no longer only tests the helper module. It now also tests the command integration layer.
Another new test file was added:
t/cases/10_dcc_ctcp_regression.t
This one protects the recent Partyline DCC work.
It specifically checks that Mediabot correctly handles raw CTCP payloads such as:
\x01CHAT\x01
\x01DCC CHAT chat <ip_int> <port>\x01
\x01DCC CHAT chat 0 0 <token>\x01
This matters because /dcc chat <botnick> can be delivered by some IRC clients as a raw CTCP DCC payload.
Without the regression fix, Mediabot could mistakenly see it as a private command named dcc, producing:
Private command 'dcc' not found
The new test makes sure this does not silently come back later.
A new documentation file was also added:
docs/CHANNEL_BAN.md
It documents:
ban / kickban / kb / unban / bans
required channel level 75
ban levels
duration formats
dangerous mask protection
automatic expiration
database migration
fresh install behavior
test commands
safety checklist
This gives the feature a clear reference point for future maintenance.
The test runner was also improved slightly:
t/test_commands.pl
It now handles UTF-8 output more cleanly by setting both STDOUT and STDERR encoding.
This helps keep test output readable when running with:
LANG=C.UTF-8 LC_ALL=C.UTF-8 perl t/test_commands.pl --verbose
Mediabot v3 is becoming more powerful.
It now includes:
DCC CHAT
CTCP CHAT
Partyline login
password masking
persistent channel bans
timed bans
kickban
ban levels
automatic expiration
mbweb
Prometheus metrics
That is a lot of moving parts.
A better test framework is no longer just a nice extra. It is becoming necessary.
These tests help catch regressions before they reach a live IRC channel.
The latest validation included:
Perl syntax checks
full test suite
focused ChannelBan tests
Partyline tests
DCC / CTCP regression tests
snap generation
snap safety checks
The generated snapshot was also checked to ensure no unwanted files were included.
Main files touched by this milestone:
Mediabot/ChannelBan.pm
Mediabot/ChannelCommands.pm
t/test_commands.pl
docs/CHANNEL_BAN.md
t/cases/09_channel_ban_commands.t
t/cases/10_dcc_ctcp_regression.t
🧪 Protego Testum: harden channel bans and DCC regression coverage
This is not the flashiest feature from the outside, but it is an important one.
It makes Mediabot v3 safer to evolve, easier to refactor, and less likely to break when new features are added.
You must be logged in to reply.