testsAndMisc/linux_configuration/scripts/periodic_background
Krzysztof kuhy Rudnicki d889c8e655
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
Shell tests / shell-tests (push) Waiting to run
Shell tests / arch-tests (push) Waiting to run
Split music_parallelism.sh into an entry script and three libs
412 lines -> 135, with the nine functions in lib/music_detect.sh (133),
lib/music_monitor.sh (91) and lib/music_status.sh (85).

find_music_services and kill_music_services stay together: the first
writes MUSIC_FOUND_PROCESS/MUSIC_FOUND_WINDOW and the second reads them,
so splitting between them would thread mutable state across files.

The test suite caught what the static checks could not. The harness
copies the script into a temp worktree to stub common.sh, and copied
exactly one file -- so after the split every source line failed and the
script died before any behaviour under test ran. Teaching it to copy
lib/ too is a harness fix under decision 8: no assertion changed, the
same five checks run, exit 0 before and after.

bash -n also earned its keep: the first splice dropped notify_user's
closing brace, and shellcheck reported that only as SC1094 "parsing of
sourced file failed" against the entry.

One rename, not a suppression: monitor_loop's local `music_services`
became `active_services` after shellcheck flagged SC2153 against the
MUSIC_SERVICES config array now visible in the same file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-16 21:50:34 +02:00
..
digital_wellbeing Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00
hosts Block by hiding apps, which the phone cannot undo 2026-08-11 19:49:11 +02:00
i3-configuration i3blocks: add Claude usage block, fix icon rendering, drop dead blocks 2026-08-10 15:14:34 +02:00
lib Split two more linux_configuration scripts; revert a third 2026-08-16 18:44:18 +02:00
system-maintenance Log why Chromium browsers die; whitelist librewolf 2026-08-09 22:27:16 +02:00
utils Fail the build on any shellcheck finding; fix the 222 the old gate hid 2026-08-03 19:49:11 +02:00
check_and_enable_services.sh Fail the build on any shellcheck finding; fix the 222 the old gate hid 2026-08-03 19:49:11 +02:00
setup_periodic_system.sh Split two more linux_configuration scripts; revert a third 2026-08-16 18:44:18 +02:00