Skip to content

fix: strict-mode hardening, zero-sink counting, udev root re-exec - #25

Merged
JarbasAl merged 1 commit into
devfrom
fix/strict-mode-review
Jul 12, 2026
Merged

JarbasAl merged 1 commit into
devfrom
fix/strict-mode-review

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

Final pass of the perfection sweep (follows #20–#24):

  • Strict-mode safety: || true on all no-match grep pipelines in lib/audio-utils.sh — the tools run under set -euo pipefail, where an empty lookup aborted the caller. New bats tests source the lib under strict mode with an ERR trap to lock this in.
  • Zero-sink bug: echo "" | wc -l returns 1, so an empty sink list counted as one sink and the combine-sinks retry loop never retried. count_csv handles the empty string.
  • udev root re-exec: combine-sinks re-execs as the OVOS user when triggered as root so pactl reaches the user session's sound server.
  • install.sh installs pipewire-pulse + pulseaudio-utils so the pactl-based implementations work on generic (non-raspOVOS) systems; README matrix wording corrected.

31 bats tests green; shellcheck green.

🤖 Generated with Claude Code

|| true guards keep no-match greps from aborting set -euo pipefail
callers (with regression tests that source the lib in strict mode);
count_csv fixes the zero-sink case where 'echo "" | wc -l' counted 1
and defeated the retry loop; combine-sinks re-execs as the OVOS user
when udev triggers it as root so pactl reaches the user session;
install.sh installs pipewire-pulse + pulseaudio-utils so the pactl
paths work on generic systems.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@JarbasAl, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 96ad0146-59d5-458c-9326-36dec5aa3ba5

📥 Commits

Reviewing files that changed from the base of the PR and between 2a809a7 and 5d56ebf.

📒 Files selected for processing (5)
  • README.md
  • combine-sinks
  • install.sh
  • lib/audio-utils.sh
  • test/audio-utils.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/strict-mode-review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JarbasAl
JarbasAl merged commit e9d91e9 into dev Jul 12, 2026
3 checks passed
@JarbasAl
JarbasAl deleted the fix/strict-mode-review branch July 12, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant