MB678 continues the progressive decomposition of Mediabot’s Partyline subsystem.
After MB678-IV-A introduced Mediabot::Partyline::Commands with the plugin and ScriptDryRun command family, MB678-IV-B moves the next coherent group: the core operator/session commands used for Partyline help, console interaction, MOTD handling, user matching, booting, WHOIS, and logging.
The objective remains deliberately conservative: reduce the size and responsibility of Mediabot::Partyline without changing protocol behaviour, command syntax, privilege semantics, runtime routing, or the historical method surface.
MB678-IV-B moves the following methods from:
Mediabot/Partyline.pm
into:
Mediabot/Partyline/Commands.pm
Methods moved:
_cmd_help
_cmd_console
_cmd_motd
_send_motd
_cmd_whom
_cmd_match
_cmd_boot
_cmd_whois
_cmd_log
This command family covers:
The dispatcher remains unchanged.
It still routes commands through the historical $self->_cmd_* surface, while Mediabot::Partyline imports the moved methods back from Mediabot::Partyline::Commands.
Existing callers therefore continue to resolve:
Mediabot::Partyline->_cmd_help(...)
Mediabot::Partyline->_cmd_console(...)
Mediabot::Partyline->_cmd_motd(...)
Mediabot::Partyline->_send_motd(...)
Mediabot::Partyline->_cmd_whom(...)
Mediabot::Partyline->_cmd_match(...)
Mediabot::Partyline->_cmd_boot(...)
Mediabot::Partyline->_cmd_whois(...)
Mediabot::Partyline->_cmd_log(...)
without knowing that their implementations moved.
Before MB678-IV-B:
Mediabot/Partyline.pm : 4196 lines
Mediabot/Partyline/Commands.pm : 882 lines
After MB678-IV-B:
Mediabot/Partyline.pm : 3684 lines
Mediabot/Partyline/Commands.pm : 1421 lines
Mediabot/Partyline/Dispatcher.pm : 407 lines
Mediabot/Partyline/SessionAuth.pm : 676 lines
Mediabot/Partyline/Transport.pm : 1012 lines
The parent Partyline module loses roughly another 500 lines.
The subsystem now has an increasingly explicit architecture:
Partyline.pm
remaining command implementations and core Partyline behaviour
Partyline/Commands.pm
extracted command families
Partyline/Dispatcher.pm
input routing and command dispatch
Partyline/SessionAuth.pm
session lifecycle and authentication
Partyline/Transport.pm
TCP / DCC transport and low-level input handling
MB678-IV-B intentionally leaves scheduler and unrelated command families in Partyline.pm.
The extraction remains incremental rather than turning command modularization into one giant rewrite.
A dedicated extraction contract was added:
t/cases/866_mb678_partyline_core_commands_extraction.t
Initial focused validation covered the new extraction boundary together with help, exception-redaction, pagination/truncation, and Partyline command contracts.
Result:
PASSED : 190/190
The complete set of directly affected contracts was then exercised:
PASSED : 418/418
The historical method surface was checked explicitly for all nine moved methods.
Result:
9/9 historical methods resolved through Mediabot::Partyline
Moving _cmd_help exposed several tests that treated the physical location of Partyline help text as part of their contract.
The runtime behaviour was correct; the tests simply needed to follow the new architecture.
.lusers help contractThe fast suite initially reported:
FAILED : 1/5711
The failure came from:
741_mb544_lusers_debug_partyline.t
The .lusers implementation still lives in Partyline.pm, but its help entry moved with _cmd_help into Partyline/Commands.pm.
The source contract was updated to inspect both modules.
Targeted result:
PASSED : 20/20
The full suite later reported a single full-only failure:
FAILED : 1/14623
The affected test was:
813_mb631_ai_summary_admin_gate.t
Again, _cmd_ai remained in Partyline.pm, while its Partyline help entry moved into Partyline/Commands.pm.
The contract was updated to follow both source locations.
Targeted result:
PASSED : 32/32
No runtime code was changed for either fix.
The security audit remained completely green:
Verdict: GO — all 11 security invariants hold.
The extraction preserved:
No security invariant regressed as a result of moving the command implementations.
The development service restarted successfully:
mediabot@dev.service
Active: active (running)
The Partyline listener remained available on:
0.0.0.0:23456
A real TCP login smoke test still produced:
Mediabot Partyline
Please enter your nickname.
Enter your password.
with:
RC_SMOKE=0
The runtime journal showed no obvious fatal, syntax, loading, or listener errors.
After correcting the stale .lusers help source contract:
PASSED : 5711/5711 (64s)
The fast suite was fully green.
The first full run reached:
14622/14623
with one isolated source-contract failure in test 813.
That specific contract was corrected and revalidated directly:
PASSED : 32/32
Because the fix changed only the test’s source lookup and no runtime code, the already-green fast suite and runtime validation remained applicable.
MB678-IV-B demonstrates that the Partyline::Commands boundary introduced in IV-A scales beyond the initial plugin/ScriptDryRun family.
The moved methods are more central to everyday Partyline operation:
Successfully moving these commands without altering the dispatcher, authentication layer, transport layer, or external method surface is a strong validation of the incremental architecture.
The parent module has now fallen from:
6976 lines before MB678
to:
3684 lines after MB678-IV-B
while the behaviour remains compatible.
That is the core goal of the refactor: not merely moving code, but steadily turning one very large Partyline module into explicit, testable responsibility boundaries.
No command syntax changed.
No privilege model changed.
No Partyline protocol changed.
No historical method disappeared.
The keys still open the same doors; the commands simply have a better chamber.
Version : 3.4dev-20260821_053701
Commit : 1c34240
Branch : master
🗝️ Give Partyline Core Commands Their Own Chamber Without Changing the Keys
Commit summary:
19 files changed
655 insertions
538 deletions
New test:
t/cases/866_mb678_partyline_core_commands_extraction.t
The commit was successfully pushed to GitHub.
🗝️ The keys still open the same doors. The commands simply have a better chamber now.
You must be logged in to reply.