Context
While fixing PR #441's Codex QA finding on scripts/rig/probe-outputs.sh (a failed ac setup/ac generate wasn't checked, so a lost ack could let emission proceed through whatever output the daemon still had configured), I noticed scripts/rig/acoustic-ir.sh has an unchecked ac setup call with the same shape, at line 69:
ac setup output "\$SPK" input "\$MIC" >setup.log 2>&1
echo "- daemon executable: \$(daemon_identity)"
...
"\$DEST/ir_probe" --level-dbfs "\$LEVEL" --duration "\$DUR" --f1 "\$F1" --f2 "\$F2" --window "\$WIN" \$TAU >run.log 2>&1
The remote script only has set -u, no set -e, and ac setup's exit status is discarded (redirected to setup.log, never checked). If that ack is lost — the exact scenario the Codex finding described for probe-outputs.sh — ir_probe still runs next, driving through whatever routing the daemon actually has, not necessarily $SPK/$MIC. This is the speaker-out route, so the practical risk is the same one probe-outputs.sh's fix addresses: a wiring/ceiling assumption that doesn't hold at emission time.
Not filed as blocking #441, since Codex's finding named probe-outputs.sh specifically and #441 is already scoped to fixing that. run-loopback-ir.sh doesn't have this shape — it runs it_loopback_ir directly with routing passed via env vars into its own isolated-HOME daemon, no separate ac setup step to race against.
Suggested fix
Apply the same pattern scripts/rig/lib/probe_remote.sh now uses: set -e on the remote script, and verify the daemon's config actually reads $SPK/$MIC after the ac setup call, before invoking ir_probe. probe_remote.sh's current_output() helper (reads output_channel from $HOME/.config/ac/config.json) is directly reusable; would need an input-channel equivalent too since this path sets both output and input.
Context
While fixing PR #441's Codex QA finding on
scripts/rig/probe-outputs.sh(a failedac setup/ac generatewasn't checked, so a lost ack could let emission proceed through whatever output the daemon still had configured), I noticedscripts/rig/acoustic-ir.shhas an uncheckedac setupcall with the same shape, at line 69:The remote script only has
set -u, noset -e, andac setup's exit status is discarded (redirected tosetup.log, never checked). If that ack is lost — the exact scenario the Codex finding described forprobe-outputs.sh—ir_probestill runs next, driving through whatever routing the daemon actually has, not necessarily$SPK/$MIC. This is the speaker-out route, so the practical risk is the same one probe-outputs.sh's fix addresses: a wiring/ceiling assumption that doesn't hold at emission time.Not filed as blocking #441, since Codex's finding named
probe-outputs.shspecifically and #441 is already scoped to fixing that.run-loopback-ir.shdoesn't have this shape — it runsit_loopback_irdirectly with routing passed via env vars into its own isolated-HOME daemon, no separateac setupstep to race against.Suggested fix
Apply the same pattern
scripts/rig/lib/probe_remote.shnow uses:set -eon the remote script, and verify the daemon's config actually reads$SPK/$MICafter theac setupcall, before invokingir_probe.probe_remote.sh'scurrent_output()helper (readsoutput_channelfrom$HOME/.config/ac/config.json) is directly reusable; would need an input-channel equivalent too since this path sets both output and input.