Skip to content

fix(audio): default sound paths hardcode Windows backslashes and filenames on macOS/Linux #72

Done

Description

@mlgitdev

Description

DEFAULT_CONFIG["alerts"] constructs default sound paths using MEDIA + r"\Windows Notify System Generic.wav", etc. On macOS (/System/Library/Sounds) and Linux (/usr/share/sounds), this yields broken mixed-separator paths pointing to non-existent Windows .wav files. Additionally, in app/sounds.py, Linux paplay ignores self.volume and fallback sys.stdout.write("\a") fails when sys.stdout is None in windowed frozen executables.

References: app/config.py:67-73, 153-157, app/sounds.py:85-94

Steps to Reproduce

  1. Initialize NewsAlerts on macOS or Linux with default configuration.
  2. Inspect alerts.sound_new_symbol in config.json.
  3. Observe invalid path /System/Library/Sounds\Windows Notify System Generic.wav (macOS) or /usr/share/sounds\Windows Ding.wav (Linux).

Expected Behavior

Default sound paths should use pathlib.Path with OS-appropriate native sound files (macOS .aiff / Linux discovered .ogg/.wav), Linux paplay should apply volume scaling, and fallback bell should guard if sys.stdout:.

Operating System & Version

  • OS: Windows 11 x64 / macOS arm64 / Linux x86_64
  • Version: v2.12.0
  • Display / Scale: Verified via live Chrome CDP (1600x960) & local unit/backend suite

Logs & Additional Context

Backend verification confirmed hardcoded MEDIA + r"\Windows Notify System Generic.wav" concatenation in app/config.py.

Activity

  1. added
    bug
    on Dec 2, 2026
  2. self-assigned this
    on Dec 2, 2026
  3. mlgitdev commented on Dec 2, 2026

    @mlgitdev
    OwnerAuthor

    🚀 Resolution In Progress

    A fix for this issue has been implemented and submitted in Pull Request #82 (v2.12.1).

    • Branch: fix/audit-remediation-67
    • PR URL: fix(core): resolve 15 verified audit issues across UI, API, concurrency, audio, and packaging (v2.12.1) #82
    • Summary of Changes: Replaced hardcoded Windows sound paths in app/config.py with OS-native _default_sound_path() using Path/PurePosixPath, added Linux paplay --volume scaling, and guarded sys.stdout fallback beep in app/sounds.py. Verified via unit tests.
    • Verification: compileall clean, 84/84 unit tests passing (including tests/test_audit_fixes.py), and live Chrome CDP verification passed.

    This issue will automatically close upon PR #82 review and merge into main.

  4. github-actions commented on Dec 2, 2026

    @github-actions

    ✅ Issue Validation Passed

    • Conventional Commit title syntax (fix(audio))
    • Verified issue type: BUG
    • Required template sections present and filled out

    This issue is well-structured and ready for work according to the Issue-First Protocol.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions