mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 17:14:08 +01:00
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 |
||
|---|---|---|
| .. | ||
| lib | ||
| llm-notes | ||
| pacman | ||
| systemd | ||
| virtualbox | ||
| .gitignore | ||
| block_compulsive_opening.sh | ||
| install_leechblock.sh | ||
| install_ublock.sh | ||
| leechblock_defaults.json | ||
| music_parallelism.sh | ||
| package-lock.json | ||
| package.json | ||
| README_COMPULSIVE_BLOCK_LLM.md | ||
| README_MIDNIGHT_SHUTDOWN_LLM.md | ||
| remove_guest_mode.sh | ||
| seed_leechblock_storage.js | ||
| seed_ublock_storage.js | ||
| setup_midnight_shutdown.sh | ||
| setup_night_lockdown.sh | ||
| youtube-music-wrapper.sh | ||