This Mediabot v3 pass was one of those quiet but important cleanup rounds.
Claude helped push several useful features forward, then a few sharp edges appeared during real testing. The result is now cleaner: bugs fixed, help aligned, exports deduplicated, logs safer, and the test suite green again.
No database schema change.
The full static and live suites are green again:
OK: static tests passed
OK: live tests passed
OK: logs written successfully
That matters because this pass touched several runtime areas:
DCC / Partyline
JOIN handling
notes
reminders
help table
command exports
metrics
recent Claude feature additions
Two sensitive runtime values were cleaned up.
Passive DCC still needs the real token internally, but the full token should never appear in logs.
Mediabot now logs only a redacted hint.
The real token is still passed to the DCC protocol path, so functionality is preserved.
Channel keys are effectively passwords for protected channels.
The bot now still sends the real key to IRC when joining, but logs and Partyline output show:
[redacted]
instead of the real key.
Tests added:
345_dcc_passive_token_redacted.t
346_join_channel_key_redacted.t
Claude added a Prometheus uptime gauge, but the first patch accidentally injected the metric update inside a log string concatenation in mediabot.pl.
That broke compilation.
The fix moves the uptime update into its own eval block before the health_check log line.
Test added:
377_healthcheck_uptime_metric_syntax.t
remindsnooze had a dead SQL prepare block using invalid CONCAT('[at:?, ]'...) syntax.
That block was removed.
The command now keeps the safer flow:
fetch existing reminder message
rewrite [at:TS] prefix in Perl
update message using a normal SQL placeholder
Test coverage was added to ensure this remains portable and sane.
Claude’s recent note improvements stored notes as richer hash-backed structures, but a few paths still assumed plain strings.
This pass fixed:
note export
note search
case-insensitive nick storage via lc nick
stale 256-character limit
The current note limit is now consistently the intended 200-character limit.
Tests added:
378_remindsnooze_note_hash_safety.t
380_note_export_lc_key_and_limit.t
Recent feature waves added several new command handlers, and some exports had become duplicated.
The @EXPORT block in Mediabot::UserCommands is now deduplicated, while keeping the recent handlers available:
mbKarmaWatch_ctx
mbKarmaDiff_ctx
mbKarmaGraph_ctx
mbKarmaInfo_ctx
mbKarmaReset_ctx
mbPollExtend_ctx
mbPollStatus_ctx
mbPollVoters_ctx
mbTriviaReset_ctx
mbTriviaStop_ctx
mbTriviaTop_ctx
mbUnvote_ctx
Test added:
379_usercommands_export_dedup.t
The internal help table had a few malformed rows after the recent command additions:
remindlist|remindsnooze|...
pollstatus|pollvoters|...
Those are now cleaned up.
The help table also explicitly keeps:
ai persona
quote
spike
remindsnooze
pollvoters
pollstatus
This matters because Mediabot’s help table is not just cosmetic. It drives user-facing help, command documentation, and several static consistency tests.
Test added:
381_help_table_recent_cleanup.t
The cleanup keeps the useful recent additions from Claude’s pass while correcting integration mistakes.
Included work from that wave:
choose guard after deduplication
karmatop improvements
stat enrichment
anti-flood silence-lift notification
remindcancel all
pollvoters
karmawatch
remindsnooze
note length guard
AF4 warn-only mode
Partyline .kv
uptime metric
The important part: the useful features stay, but the rough integration edges are now guarded by tests.
This patch improves Mediabot v3 without changing the database schema:
safer logs
cleaner command exports
fixed health_check compilation
more robust reminders
consistent note behavior
cleaner internal help
new regression tests
full static + live suite green
Reparo Integrum!
Not a giant rewrite.
Not a schema migration.
Just careful repair work after a big feature wave.
The charms hold. The tests are green. Mischief managed. 🧙♂️✨
You must be logged in to reply.