MIDI hold and auto-fix move a link joined by name to the owning Mac's wired address

- WS 2026-10-21: FOH Mac mini joined ProPresenter's session by name; hold said "no automatic fix". Now the
  address comes from the link's own check, else the Mac that owns that session (wired SSH / ingest address +
  session port); auto-fix does it too, never while a HyperDeck records
- WS: FOH Mac mini <-> ProPresenter watched (FOH PROP); auto-fix moved it to 10.2.1.12:5004 by itself

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 20:52:42 -04:00
co-authored by Claude Opus 5.5
parent af4bfc868d
commit 51a14140cc
3 changed files with 75 additions and 6 deletions
+37 -1
View File
@@ -1293,7 +1293,10 @@ class TestFixes(unittest.TestCase):
self.assertEqual([(c["host"], c["session"], c["peer"], c["address"]) for c in moves],
[("tracks", "NA Tracks", "Studio B Mac Studio", "10.1.13.175:5004")]) # ProdDash's own: left to it
auto = engine.fix_plan("midi", self.snap, SUNDAY + 30, 0, True)
self.assertFalse(any(c.get("repoint") for _, _, _, c in auto)) # never by itself: a hold
self.assertTrue(any(c.get("repoint") for _, _, _, c in auto)) # auto-fix moves it too (user, 2026-10-21) ...
engine.any_recording = True
auto = engine.fix_plan("midi", self.snap, SUNDAY + 30, 0, True)
self.assertFalse(any(c.get("repoint") for _, _, _, c in auto)) # ... but never while a HyperDeck records
def test_an_off_pc_is_woken(self):
from unittest import mock
@@ -2663,3 +2666,36 @@ class TestMidiNoState(unittest.TestCase):
self.assertEqual(self.check(s, 110.0).msg, "MIDI CONNECTING") # put back: not trusted yet
self.assertEqual(self.check(s, 125.0).msg, "MIDI CONNECTING")
self.assertEqual(self.check(s, 131.0).level, sp.OK) # stayed 20 s: it answered
class TestByNameMove(unittest.TestCase):
"""WS 2026-10-21: FOH Mac mini joined ProPresenter's session by name; a hold said "no automatic fix"."""
def setUp(self):
self.cfg = sp.load_config(os.path.join(ROOT, "sites", "ws", "config.json"))
self.engine = sp.Engine(self.cfg)
self.snap = healthy_snapshot(SUNDAY)
self.snap.midi = {"ProPresenter": {"port": 5004, "peers": [
{"name": "WS FOH Mac mini", "address": "\tWS FOH Mac mini\tlocal.", "state": "running"},
{"name": "Lighting", "address": "10.2.2.2:5004", "state": "running"}]}}
self.snap.midi_time = SUNDAY
foh = next(a for a, h in self.cfg["hosts"].items() if str(h.get("ssh", "")).endswith("@10.2.1.12"))
self.snap.remote_midi = {foh: {"WS FOH Mac mini": {"port": 5004, "peers": []}}}
self.snap.remote_midi_time = {foh: SUNDAY}
self.midi = next(t["id"] for t in self.cfg["tiles"] if t["label"] == "MIDI")
def moves(self, errors_only):
run_steps(self.engine, self.snap, SUNDAY, 3)
return [chk for _, kind, what, chk in self.engine.fix_plan(self.midi, self.snap, now=SUNDAY + 3, errors_only=errors_only)
if chk.get("repoint")]
def test_a_hold_moves_it_to_the_owning_macs_wired_address(self):
moves = self.moves(False)
self.assertEqual([(c["session"], c["peer"], c["address"]) for c in moves],
[("ProPresenter", "WS FOH Mac mini", "10.2.1.12:5004")])
def test_auto_fix_moves_it_too_but_never_while_recording(self):
self.assertEqual(len(self.moves(True)), 1)
self.engine.any_recording = True # a HyperDeck records: left alone
plan = self.engine.fix_plan(self.midi, self.snap, now=SUNDAY + 3, errors_only=True)
self.assertEqual([c for _, k, w, c in plan if c.get("repoint")], [])