Forum teuk.org

MB754 — The Quote Vault Changes Keepers Without Changing Its Locks 📜✨

in Mediabot · started by TeuK · yesterday

TeuK · yesterday

Mediabot’s API v3 migration has reached one of its most visible rooms: the quote vault.

MB754 moves the public q and quote commands into the first-party quotes-v3 package, alongside quotecount, topquote and halloffame. The change is deliberately reversible, scoped per channel and guarded by the same core-owned security rules as the historical implementation.

The result is a new keeper for the vault — but the locks, permissions and stored quotes remain under Mediabot’s authority.

Five commands, one reversible bridge

The quotes-v3 package can now own the complete public quote command family:

  • q
  • quote
  • quotecount
  • topquote
  • halloffame

Each command is mounted through the API v3 command registry while Mediabot retains the exact original handler. Disabling or unloading the package restores those saved handlers rather than rebuilding an approximation of them.

Channel policy decides which path is authoritative:

  • off keeps the historical built-ins in charge;
  • observe executes the v3 path silently while users still see only the historical response;
  • on gives quotes-v3 authority on that explicitly selected channel.

Nothing is activated automatically. Installing MB754 does not load the package, grant capabilities, enable it or opt any channel into the migration.

Shadow magic without shadow mutations

Observe mode is designed for evidence, not faith.

The v3 implementation can perform bounded reads for parity comparison, including anti-repeating random selection, literal author matching, the historical 50-result search ceiling and detached quote statistics. Its IRC output is suppressed, so the channel continues to receive one answer from the established handler.

Writes are held behind a stronger ward. Quote additions, deletions and recall counters cannot reach the core mutation service unless channel policy is explicitly on. This prevents an observe run from inserting a duplicate quote or incrementing a quote’s hit count behind the operator’s back.

Visible v3 recalls use a dedicated recall operation so the historical ranking semantics remain intact once the package becomes authoritative.

The database keys stay with the core

The plugin never receives SQL access, a DBI handle, mutable user objects, passwords, hostmasks or raw IRC messages.

Instead, it works with detached quote records and an immutable principal derived by Mediabot. The core selects the effective channel, checks policy, applies the existing authorization rules and performs only the bounded operations exposed by the quote services.

In other words, the package may ask for a spell to be cast; it never receives the keys to the Restricted Section.

A live rehearsal strengthened the gate

The supervised rehearsal also exposed an old authorization edge at the moduser boundary: a stored privileged hostmask could reach account-management code without an authenticated IRC session.

MB754 closes that path. moduser now requires an authenticated global Administrator before any account mutation can begin. The new regression contract keeps that ward in place independently of the quote migration itself.

Proof before the owl left

The final MB754 surface passed every planned gate:

  • targeted security and migration suite: 440/440 tests;
  • fast development lane: 7,612/7,612 tests;
  • unique pre-commit full suite: 20,058/20,058 tests.

The milestone was committed and pushed as:

7633925 — MB754: usher quote commands through the Ministry gateway 📜✨

The development version is now 3.6dev-20260920_205026.

MB754 introduces no schema change, no private-configuration change and no automatic live quote mutation.

Next stop: supervised evidence

The code milestone is complete. The roadmap now calls for an observe-first pilot on one quiet development channel, followed by an explicit operator decision before switching that channel to on.

Only measured operational evidence can open the next door. Automatic remediation remains outside this milestone; containment stays manual, precise and reversible.

The quote vault has changed keepers. The Marauder’s Map still shows exactly who may enter. 🗺️🪄

You must be logged in to reply.