Commit b03f787e by PLN (Algolia)

Recognise Ardour on Ubuntu: the launcher and the gate were blind to it

Ardour's real binary is ardour-8.4.0~ds1 and its process name is ArdourGUI. The
launcher's exe pattern could not match the Debian ~ds1 suffix, so it believed
Ardour was down and spawned a second instance on the same session (the 09-05
duplicate, recorded as 'not reproducible', was never measured against this
build). The gate's pgrep -x names never matched either, so its 'Ardour is open'
precondition was always false and SC -> Ardour and gig-record-on-target were
skipped on every run.
parent bf763762
...@@ -71,7 +71,7 @@ LAUNCHERS = [ ...@@ -71,7 +71,7 @@ LAUNCHERS = [
"candidates": ["ardour9", "ardour8", "ardour7", "ardour6", "ardour"], "candidates": ["ardour9", "ardour8", "ardour7", "ardour6", "ardour"],
"args": ([str(ARDOUR_SESSION)] if ARDOUR_SESSION.exists() else []), "args": ([str(ARDOUR_SESSION)] if ARDOUR_SESSION.exists() else []),
"wrap": ["pw-jack"], "wrap": ["pw-jack"],
"exe": r"[Aa]rdour[-\d.]*$"}, "exe": r"[Aa]rdour\d*(?:-\d[\w.~+-]*)?$"},
# PLN, 2026-09-22: "have a QjackCTL launcher entry for 'pw-link qjackctl' in # PLN, 2026-09-22: "have a QjackCTL launcher entry for 'pw-link qjackctl' in
# the parvagues gear tray, so i can easily open it when i wanna" — the row # the parvagues gear tray, so i can easily open it when i wanna" — the row
# already existed, but bare; `pw-link` is the link-making tool, the launcher # already existed, but bare; `pw-link` is the link-making tool, the launcher
......
...@@ -77,6 +77,22 @@ def test_the_ardour_exe_pattern_matches_a_version_suffixed_binary(): ...@@ -77,6 +77,22 @@ def test_the_ardour_exe_pattern_matches_a_version_suffixed_binary():
assert L.is_running(spec, [(exe, f"/usr/bin/{exe}")]) is True, exe assert L.is_running(spec, [(exe, f"/usr/bin/{exe}")]) is True, exe
def test_the_ubuntu_debian_build_name_is_recognised_as_ardour():
"""2026-10-11: the real argv0 here is `ardour-8.4.0~ds1` (a Debian `~ds1`
suffix). The old pattern `[Aa]rdour[-\\d.]*$` could not match it, so the
launcher believed Ardour was down while it ran and started a SECOND one on the
same session. The 2026-09-05 note called that false negative 'not reproducible';
it was only never measured against this build."""
spec = L.BY_KEY["ardour"]
assert L.is_running(spec, [("ardour-8.4.0~ds1", "/usr/lib/ardour8/ardour-8.4.0~ds1 x.ardour")]) is True
def test_ardours_helper_scripts_are_not_a_running_ardour():
spec = L.BY_KEY["ardour"]
for exe in ("ardour-avahi", "ardour8-lua", "ardour-session-utils", "tidal-ardour-autoroute.sh"):
assert L.is_running(spec, [(exe, f"/usr/lib/ardour8/{exe}")]) is False, exe
def test_a_session_filename_ending_in_dot_ardour_is_not_a_running_ardour(): def test_a_session_filename_ending_in_dot_ardour_is_not_a_running_ardour():
spec = L.BY_KEY["ardour"] spec = L.BY_KEY["ardour"]
assert L.is_running(spec, [("cp", "cp 'Tidal Live.ardour' /tmp")]) is False assert L.is_running(spec, [("cp", "cp 'Tidal Live.ardour' /tmp")]) is False
......
...@@ -597,9 +597,16 @@ def _running(*names: str) -> bool: ...@@ -597,9 +597,16 @@ def _running(*names: str) -> bool:
# /usr/lib/ardour8, so the process name is `ardour` for the first moment and # /usr/lib/ardour8, so the process name is `ardour` for the first moment and
# `ardour-8.x` after. Match both generations by exact name; the wrapper case is # `ardour-8.x` after. Match both generations by exact name; the wrapper case is
# covered by "ardour" itself. # covered by "ardour" itself.
#
# The names above are NOT what Ubuntu runs. Ardour sets its process name to
# `ArdourGUI`, and the real binary (`ardour-8.4.0~ds1`) is cut to 15 characters
# by the kernel, so none of the exact names ever matched: the "Ardour is open"
# precondition was always false and `SC -> Ardour` and `gig-record on target`
# were SKIPPED on every run, including the day the signal path they probe broke
# (2026-10-11). `ArdourGUI` is the name that is actually there.
PRECONDITIONS = { PRECONDITIONS = {
"scsynth": lambda: _running("scsynth"), "scsynth": lambda: _running("scsynth"),
"ardour": lambda: _running("ardour", "ardour8", "ardour9", "ardour": lambda: _running("ArdourGUI", "ardour", "ardour8", "ardour9",
"ardour-8.4.0", "ardour-8.6.0"), "ardour-8.4.0", "ardour-8.6.0"),
} }
_ABSENT = { _ABSENT = {
......
...@@ -292,3 +292,15 @@ def test_a_dead_surface_driver_blocks_the_launch(): ...@@ -292,3 +292,15 @@ def test_a_dead_surface_driver_blocks_the_launch():
""" """
probe = next(p for p in CG.PROBES if p.name == "LCXL LEDs") probe = next(p for p in CG.PROBES if p.name == "LCXL LEDs")
assert probe.kind == gig_gate.BLOCK assert probe.kind == gig_gate.BLOCK
def test_the_ardour_precondition_asks_for_the_name_ardour_actually_has(monkeypatch):
"""2026-10-11: Ardour's process name is `ArdourGUI` and its binary name is cut
to 15 characters, so the exact names the gate used never matched. The
precondition was always false and `SC -> Ardour` / `gig-record on target` were
skipped on every run, including the day the path they probe broke."""
asked = []
monkeypatch.setattr(CG, "_running", lambda *names: asked.extend(names) or False)
CG.PRECONDITIONS["ardour"]()
assert "ArdourGUI" in asked
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment