Forum teuk.org

πŸ”„ MB678-IV-G β€” Give Partyline Reload Commands Their Own Room Without Changing the Spellbook

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

TeuK Β· 2d ago

MB678 continues the progressive decomposition of Mediabot’s Partyline subsystem.

After transport, session/authentication, dispatch, plugin commands, core operator commands, scheduler/operational commands, channel/network visibility, reminder/seen commands, and Karma commands, MB678-IV-G extracts the configuration reload family.

The scope stays deliberately narrow: move the reload implementation without changing configuration APIs, permissions, user-facing behaviour, dispatcher routes, or the historical Mediabot::Partyline method surface.


πŸ”„ What moved

MB678-IV-G moves the following methods from:

Mediabot/Partyline.pm

into:

Mediabot/Partyline/Commands.pm

Methods moved:

_reload_configuration_file
_cmd_reloadconf
_cmd_reload

This family covers:

  • the shared checked configuration reload path;
  • .reloadconf;
  • Owner-only .reload.

The following families intentionally remain in Partyline.pm:

_cmd_lusers
_cmd_stats
_cmd_rehash
_cmd_restart
...

The extraction therefore remains bounded and does not mix configuration reload with network visibility or IRC lifecycle operations.


🧱 Structural result

Before MB678-IV-G:

Mediabot/Partyline.pm          : 2675 lines
Mediabot/Partyline/Commands.pm : 2476 lines

After MB678-IV-G:

Mediabot/Partyline.pm             : 2617 lines
Mediabot/Partyline/Commands.pm    : 2552 lines
Mediabot/Partyline/Dispatcher.pm  :  407 lines
Mediabot/Partyline/SessionAuth.pm :  676 lines
Mediabot/Partyline/Transport.pm   : 1012 lines

The original pre-MB678 parent module contained:

6976 lines

It now stands at:

2617 lines

πŸ§ͺ Focused validation

A new extraction contract was added:

t/cases/872_mb678_partyline_reload_commands_extraction.t

The historical atomic reload source contract was adapted:

t/cases/587_mb368_atomic_config_reload.t

The targeted validation set covered:

586
587
872

Result:

PASSED : 109/109

The historical method surface was explicitly checked for:

_reload_configuration_file
_cmd_reloadconf
_cmd_reload

Result:

3/3 resolved through Mediabot::Partyline

🧩 Reload API contract

The shared helper continues to require the real configuration API:

reload()

and explicitly does not reintroduce the obsolete/non-existent:

load()

The extraction preserves:

  • checked configuration object availability;
  • reload() capability validation;
  • failure detection;
  • sealed Partyline error reporting;
  • Owner-only permission enforcement for .reload;
  • logging of successful Owner reloads.

No configuration semantics changed.


🧹 Small source cleanup

The round also corrected a stale source comment that labelled the _cmd_lusers section as:

.reloadconf

It now correctly documents the .lusers command.

This is documentation-only cleanup and does not alter runtime behaviour.


⚑ Fast suite with progress

MB679’s new progress mode was used for the first regular MB678 validation round:

perl t/test_commands.pl --fast --progress

The runner selected:

319 of 755 discovered test files

Result:

[====================] 100% [319/319 files | 5811 tests]

PASSED : 5811/5811  (64s)

πŸ›‘οΈ Security audit

The security audit remained completely green:

RC_AUDIT=0
Verdict: GO β€” all 11 security invariants hold.

The reload extraction did not weaken any existing authentication, throttling, transport, download-cap, or external-command invariant.


πŸ”Œ Real runtime validation

The development instance restarted successfully:

mediabot@dev : active

The Partyline listener remained available on:

0.0.0.0:23456

A real TCP smoke test produced:

Mediabot Partyline
Please enter your nickname.
Enter your password.

Result:

RC_SMOKE=0

No obvious runtime errors were found in the service journal.


🏰 Full suite with progress

The complete regression suite was executed using the new progress display:

perl t/test_commands.pl --progress

Result:

[====================] 100% [755/755 files | 14766 tests]

PASSED : 14766/14766  (209s)

No source-contract cleanup round was required after the full suite.


🧠 Why this matters

Configuration reload is a coherent Partyline responsibility.

Moving it as one unit keeps the parent module smaller while preserving the exact same operational behaviour.

The current Partyline decomposition now has dedicated boundaries for:

  • transport;
  • session/authentication;
  • dispatch;
  • plugin commands;
  • core operator/session commands;
  • scheduler/operational commands;
  • channel/network visibility commands;
  • reminders and seen-history commands;
  • Karma commands;
  • configuration reload commands.

No configuration API changed.

No privilege rule changed.

No Partyline protocol changed.

The spellbook stayed the same; the reload incantations simply moved to a better room.


πŸ“¦ Commit

Version : 3.4dev-20260821_091303
Commit  : d689416
Branch  : master

πŸ”„ Give Partyline Reload Commands Their Own Room Without Changing the Spellbook

Commit summary:

5 files changed
160 insertions
65 deletions

New test:

t/cases/872_mb678_partyline_reload_commands_extraction.t

The commit was successfully pushed to GitHub.


πŸ”„ The spellbook never changed. The reload charms simply got their own classroom.

You must be logged in to reply.