From e9d6edc2c8e791716f3cbfbc7272fb757f7cd694 Mon Sep 17 00:00:00 2001 From: Waters Church Date: Sun, 27 Sep 2026 11:03:57 -0400 Subject: [PATCH] SPL Meter 0.4.3: a failed capture-tool build must not park the listener forever MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same deadlock the Timers module hit live on AB (fixed there in 1.5.1): start() skipped scheduling its retry while a build was in flight, and ensureCaptureBinary's onReady only fires on build SUCCESS. A failed build therefore left the listener waiting forever on a callback that never comes — "Building the capture tool…" indefinitely — and a binary scp'd in from outside (the required path on AB, whose CLT cannot compile) was never picked up without a module remount. onReady stays as the fast path; the 30-second retry is now armed in every not-ready state, so a failed build keeps re-checking and an externally supplied binary is found within half a minute. Reproduced pre-fix (build fails at 0s, binary copied in at 3s, still untouched at 38s) and verified post-fix (retry at 30s spawns it). spl-capture --selftest unchanged against the IEC 61672 table. Co-Authored-By: Claude Fable 5 --- modules/spl-meter/module.json | 2 +- modules/spl-meter/spl-listener.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/spl-meter/module.json b/modules/spl-meter/module.json index 529f394..8eea9e5 100644 --- a/modules/spl-meter/module.json +++ b/modules/spl-meter/module.json @@ -1,7 +1,7 @@ { "id": "spl-meter", "name": "SPL Meter", - "version": "0.4.2", + "version": "0.4.3", "proddash": ">=1.5.0", "description": "Calibrated sound level, Leq and RTA from an audio input on this machine", "permissions": [ diff --git a/modules/spl-meter/spl-listener.js b/modules/spl-meter/spl-listener.js index 15f1221..ebe1276 100644 --- a/modules/spl-meter/spl-listener.js +++ b/modules/spl-meter/spl-listener.js @@ -153,9 +153,13 @@ function createSplListener(opts) { const missing = ensureBinary(); if (missing) { onUpdate({ error: missing }); - // A build in flight calls start() itself when it lands; anything else - // is config-shaped and should back off hard rather than spin. - if (missing !== BUILDING) scheduleRestart(BAD_CONFIG_RETRY_MS); + // onReady is only the FAST path (a successful build restarts us at + // once). The slow retry must stay armed regardless: a failed build + // never calls back, and a binary can also arrive from outside — scp'd + // in on a machine whose toolchain can't build (AB's broken CLT). + // Waiting on onReady alone deadlocked exactly that way in the Timers + // module: "building…" forever, with a working binary on disk. + scheduleRestart(BAD_CONFIG_RETRY_MS); return; }