v0.314.0: a restore puts the setup gate back as it was (R-1057); a test build moves with the floor (R-1053); Prowlarr links itself (R-1058); the box claims Plex by address (R-1060)
gates / gates (push) Successful in 47s

MinAgent 0.155.0 (unchanged). Tests red-proved by mutation (A: 10, B: 7, C: 1, C2: 2).

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-15 14:34:33 +02:00
parent e209a8d724
commit 17863fe8bc
22 changed files with 762 additions and 21 deletions
+20 -4
View File
@@ -13,7 +13,7 @@
// Prowlarr : one application each for Sonarr and Radarr, „Full Sync" (once)
// Plex : the drive's folders added to the EXISTING TV/film libraries, a scan, „scan when a change is
// detected" ON — with the server's own PlexOnlineToken read from Preferences.xml AT USE (`09` §3
// decision 248); never stored, never logged, sent only to http://plex:32400
// decision 248); never stored, never logged, sent only to the plex container (by address, R-1060)
// Jellyfin : the drive's folders added, a scan — with the API key named „felhom" read from Jellyfin's own
// database AT USE. No such key → one household step, said on the app's page.
//
@@ -89,10 +89,26 @@ type Wirer struct {
mu sync.Mutex
}
// New is the production Wirer: apps by container name on the docker network.
// New is the production Wirer: apps by container name on the docker network — Plex by its ADDRESS (R-1060, plexaddr.go).
func New(box Box, logger *log.Logger) *Wirer {
return &Wirer{Box: box, Logger: logger, HTTP: &http.Client{Timeout: 60 * time.Second},
URL: func(c string, port int) string { return fmt.Sprintf("http://%s:%d", c, port) }}
return &Wirer{Box: box, Logger: logger, HTTP: &http.Client{Timeout: 60 * time.Second}, URL: productionURL(logger)}
}
// productionURL maps a container to its base URL: by name, except Plex by address. A Plex that cannot be resolved falls
// back to the name (its calls then fail as before) with a WARN, never silently.
func productionURL(logger *log.Logger) func(string, int) string {
return func(c string, port int) string {
if c == "plex" {
u, err := PlexURL(port)
if err == nil {
return u
}
if logger != nil {
logger.Printf("[WARN] [mediawire] plex: %v — calling it by name, which Plex refuses as non-local (R-1060)", err)
}
}
return fmt.Sprintf("http://%s:%d", c, port)
}
}
// Run wires every present drive into every installed media app. Single-flight: a second caller waits.