catalogue-media: two modules accessing one operator-owned directory co-resolve (ADR 0051)

sonarr and radarr both access /services/media/downloads — the exact duplicate path
the resolver refused before novox/hq ADR 0051 (04-ISSUES/036, 012). Each now declares
it as an `access`, not a `directory` resource, so the pair co-resolves and one push
configures both. The operator provides the shared media dirs before apply (the host
refuses an absent access); the bed creates them after enrol and before the push.

Proves: the push is not refused, the node converges once, both modules' server and
runtime containers are up, and both server containers mount the same operator-owned
spool.

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
This commit is contained in:
2026-09-05 23:02:41 +02:00
parent e973a8ea6b
commit fc36fb5b51
2 changed files with 388 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
# One machine that becomes a mesh and is then assigned TWO media modules at once — sonarr and radarr —
# which both ACCESS the same operator-owned directory. This is the bed that proves novox/hq ADR 0051
# (04-ISSUES/036, 012): a module accesses shared operator data, it does not own it, so two modules
# naming the same path co-resolve where before they collided.
#
# The pair is the tightest co-access case:
# - sonarr accesses /services/media/downloads (shared) and /services/media/series (its own use).
# - radarr accesses /services/media/downloads (shared) and /services/media/movies (its own use).
# /services/media/downloads is the exact duplicate path the resolver refused pre-0051 (two modules
# "both declare the path"). Now each declares it as an ACCESS, not a `directory` resource — an access
# never enters the owner map — so the two co-resolve and one push configures both.
#
# The host refuses an access whose path is absent at apply (novox/hq ADR 0051): shared data is the
# operator's, mounted and never created by the mesh. So the operator provides
# /services/media/{downloads,series,movies} on the anchor BEFORE the modules apply; the test does this
# after enrol and before the push. Each module additionally OWNS its own config directory
# (/services/{sonarr,radarr}/config), which the mesh does create.
#
# MESH_LAB_HOST_BINARY=.../mesh-host MESH_LAB_BUNDLE=.../examples/substrate-first-node.lock
# scripts/build-module-runtime.sh {sonarr,radarr} build the two runtime images into the local daemon
# (they speak HTTP and need no CLI added). The service images lscr.io/linuxserver/{sonarr,radarr}
# must be in the local daemon to be stocked.
scenario: catalogue-media
segments:
hosting:
kind: public
cidr: [192.0.2.0/24]
machines:
anchor:
at: { segment: hosting, address: [192.0.2.10] }
inbound: allow
# Two *arr apps (server + runtime each) on top of the first-node substrate — seven containers.
# The Servarr images are lighter than catalogue-apps' JVM pair, so catalogue-small's 6GiB is
# ample headroom.
memory: 6GiB
cpus: 4
images:
# The first-node substrate: store, broker, control.
- postgres:17-alpine
- cloudamqp/lavinmq:latest
- mesh-control:development
# The module server images.
- lscr.io/linuxserver/sonarr:latest
- lscr.io/linuxserver/radarr:latest
# The two runtimes built by scripts/build-module-runtime.sh and stocked here.
- mesh-runtime-sonarr:development
- mesh-runtime-radarr:development
place:
all: [host, runtime]