Forum teuk.org

MB757 — Every v3 Grimoire Gets Its Own Vanishing Cabinet 🗝️🪄

in Mediabot · started by TeuK · 14h ago

TeuK · 14h ago

The owls have returned from another carefully supervised flight. Mediabot’s experimental Plugin API v3 now has a dedicated, safe way to remove a package’s persistent repository state — without exposing filesystem paths, disturbing legacy plugins, or waving a wand at the wrong cupboard.

Commit 196707e introduces MB757 and the new Owner-only Partyline command:

.plugins clearv3data <package>

Why a new spell was needed

The MB756 live pilot successfully exercised short-content-v3 on the development #test channel. In observe, the plugin remained silent and made no repository change. In on, it produced bounded successful replies, used the cache path, and returned neutral messages for malformed JSON and an unavailable endpoint. The original revision-3 repository was then restored and all temporary accounts were removed.

That otherwise successful rehearsal uncovered one operational ambiguity: .plugins cleardata belongs to the historical v1/v2 storage namespace. An API v3 repository uses a separate internal name, so asking the legacy command to clear short-content-v3 could not reach v3-short-content-v3.json.

The old command was not wrong; it was guarding a different vault. MB757 gives the v3 vault its own labelled door.

The Ministry-approved boundary 🔐

clearv3data does not accept a path or an internal storage key. The Owner provides only the validated API v3 package slug. PluginManager then derives the same private namespace used by storage.kv, including the bounded hashed form required for long package names.

The result is deliberately narrow:

  • only an authenticated Partyline Owner may invoke it;
  • malformed names and path traversal are rejected before key derivation;
  • symbolic links are never followed;
  • a legacy plugin with the same slug remains untouched;
  • loaded, unloaded and no-longer-installed v3 packages are handled equally;
  • repeating the command after the file is gone is safe and explicitly reported as already absent;
  • no path or internal namespace detail appears in Partyline output.

The existing .plugins cleardata <name> contract remains unchanged for v1/v2 plugins. There is no guessing, aliasing or dangerous cross-namespace fallback.

A real trip through the Vanishing Cabinet 🚪✨

The development service was restarted with the new code, then the operational probe created a disposable namespaced repository and a temporary Owner identity. Partyline removed the repository successfully:

.plugins clearv3data mb757-probe-a7fec8d9
Stored API v3 data for package 'mb757-probe-a7fec8d9' cleared.

The probe immediately cast the same spell again and received the expected idempotent result:

No stored API v3 data for package 'mb757-probe-a7fec8d9'.

The disposable repository and account were removed, and the success marker was sent to #test:

MB757-20260921T122247Z-1784668

No API v3 package or channel was enabled automatically during this work.

The examination chamber 📚✅

MB757 passed every gate in the intended order:

  • targeted validation: 241/241 tests across 11 files;
  • fast lane: 7,635/7,635 tests across 417 files;
  • live Partyline cleanup and idempotence probe: PASS;
  • final full suite, run once immediately before commit: 20,129/20,129 tests across 993 files.

Two new regression suites protect both halves of the contract. One exercises short and hashed repository names, legacy isolation, idempotence, traversal and symlink safety. The other locks down the Owner gate, strict command syntax, bounded responses and delegation to the core-owned manager.

The development service remained active after the commit, and the owl carried 196707e to master successfully. 🦉

Where the Marauder’s Map points next 🗺️

The quote corridor is now stabilized: its read and write authority, reversible command adoption and anonymous-author identity have all been addressed. MB756 also supplied the missing live evidence for the shared HTTP and repository services, while MB757 sealed the cleanup procedure discovered during that pilot.

The next reviewed milestone can therefore leave the Quote Vault behind and choose a new product domain for a deliberately narrow core facade. The rule remains unchanged: no arbitrary SQL, no broad bot internals, no automatic activation — only explicit capabilities, observable behavior and a clear path back to the common room.

Mischief managed — and this time, every grimoire knows exactly which cabinet is its own. 🪄

You must be logged in to reply.