aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/src/meshbay_common/adminop.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-10 17:49:58 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-10 17:49:58 +0200
commit07ff8b4f6143039fcc74b8cf7c423282bce093c1 (patch)
tree89e095aeef9f5ad0bcbe7b3e6cfdc67d36bcbba8 /packages/meshbay-common/src/meshbay_common/adminop.py
parent1e6f3861a1570029897a30b42121836fd03565c1 (diff)
downloadmeshbay-07ff8b4f6143039fcc74b8cf7c423282bce093c1.tar.gz
refactor(mnp)!: one operation for an app's folders, not one per app
`video_root`, `audio_root` and `photo_roots` are gone — the messages, the signed operations, the handlers, the `ops` wrappers, the three scalars on the handshake ack, and the client's handlers for their acks. `app_directories` does the same thing for every application, keyed by the app's own registry name, and it is what the SPA has been sending. The three were the same instruction three times, differing only in the key they wrote and whether they carried a string or a list. That shape is what made adding an application mean adding a message type, an op, a handler and a widget; it also meant three validation paths, and the older ones validated nothing — a typo was stored and then quietly matched no entry, an app showing an empty tab with no way to tell "misconfigured" from "no files yet". **What stays, and why.** `Roster.LEGACY_DIR_KEYS` still reads `video_root` and friends out of `group_settings`: that is a key on an operator's disk, not on the wire, and a node upgraded into this must find its own configuration. The Search page still reads its own older cache keys, for the same reason — the cache outlives a deploy. `CTX_ALIASES` keeps only `chat`, which is the one app whose second name something still reads. The two per-app policy test files go with the messages. What only they held — the real challenge/response path from message to database, which no other test exercises — is retargeted at `app_directories` in `test_app_directories_signed.py`, and the handler's own refusals (unknown app, malformed `directories`, nobody to authorize it) join `test_app_directories.py`. Node and common suites 1368 passed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsoWC3GmhNdwVFomW3QjH3
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common/adminop.py')
-rw-r--r--packages/meshbay-common/src/meshbay_common/adminop.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/adminop.py b/packages/meshbay-common/src/meshbay_common/adminop.py
index a80ffa9..8638e60 100644
--- a/packages/meshbay-common/src/meshbay_common/adminop.py
+++ b/packages/meshbay-common/src/meshbay_common/adminop.py
@@ -74,11 +74,6 @@ OP_TMDB_CONFIG = "tmdb_config"
# same node need not share the decision to spend TMDB quota and make
# outbound requests. Signed for the same reason as tmdb_config.
OP_TMDB_ENABLED = "tmdb_enabled"
-# Which folder (possibly a subfolder of a shared root) is the Videos app's
-# entry point for this group — per-group, like tmdb_enabled above and
-# unlike tmdb_config's token/language. Signed like the rest: it decides what
-# every member's Videos tab shows.
-OP_VIDEO_ROOT = "video_root"
# Correcting a wrong automatic TMDB match — signed for the same reason as
# tmdb_config: it changes what every member sees for a show/movie, node-wide
# (media_cache is shared, not per-viewer), so an unsigned override would let
@@ -96,15 +91,6 @@ OP_TMDB_REMATCH = "tmdb_rematch"
# the lesson was already learned once). Signed for the same reason as
# tmdb_enabled.
OP_MUSICBRAINZ_ENABLED = "musicbrainz_enabled"
-# Which folder is the Music app's entry point for this group — same shape as
-# OP_VIDEO_ROOT above, added later once a real messy library showed the
-# "no root, whole shared tree" simplification didn't hold up.
-OP_AUDIO_ROOT = "audio_root"
-# Which folder(s) are the Photos app's entry points for this group — a
-# *set*, unlike OP_VIDEO_ROOT/OP_AUDIO_ROOT above: a photo library is
-# routinely scattered across several folders (docs/photos.md §2.1). The
-# whole set is signed and replaced in one op, same shape as OP_APPS_ENABLED.
-OP_PHOTO_ROOTS = "photo_roots"
OP_ROOT_ADD = "root_add"
OP_ROOT_REMOVE = "root_remove"
# One op for every application's directories. The subject is