Skip to content

acoustic-ir.sh: unchecked ac setup has the same lost-ack shape probe-outputs.sh just fixed #456

Description

@mkovero

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.shir_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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions