mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 17:34:04 +01:00
Four libs written in one pass rather than four sequential splits, which is what stops the libs chaining - the entry gets one source block naming all four and no lib sources a sibling. steam_compatibility.sh is reverted and stays at 663. Its CACHE_MAP associative array is declared and filled in what would be the ProtonDB lib but read by main, so that lib fails SC2034 linted alone. Third file deferred for the same reason: shared mutable state means the seam is not there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
45 lines
2.8 KiB
JSON
45 lines
2.8 KiB
JSON
{
|
|
"intent": "Split fix_bluetooth.sh (720 lines) under the cap in a single multi-lib pass, and defer steam_compatibility.sh whose seam crosses a shared associative array.",
|
|
"scope": [
|
|
"linux_configuration/scripts/single_use/fixes/fix_bluetooth.sh (720 -> 186)",
|
|
"lib/bt_adapter.sh, bt_pairing.sh, bt_audio.sh, bt_report.sh (new)",
|
|
"Deferred and fully restored: single_use/utils/steam_compatibility.sh (663)",
|
|
"Non-goal: no script executed"
|
|
],
|
|
"changes": [
|
|
"fix_bluetooth.sh split into four libs in one pass rather than four sequential passes. Writing all the libs at once is what avoids the chaining bug seen twice before: the entry gets a single source block naming every lib, and no lib sources a sibling.",
|
|
"The four libs follow the script's own phases: adapter and firmware recovery, pairing and USB autosuspend, PipeWire and audio, then instructions and diagnostics.",
|
|
"steam_compatibility.sh was reverted. Its CACHE_MAP associative array is declared and populated in what would be the ProtonDB lib but read by main, so the lib fails SC2034 when linted alone. Same class as the pacman stall script: the seam does not exist without passing that state explicitly."
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "meta/scripts/verify_shell_split.sh fix_bluetooth.sh check_firmware remove_stale_pairing check_pipewire_health show_instructions dump_diagnostics connect_device",
|
|
"result": "pass",
|
|
"evidence": "'libs sourced, functions defined' across all four libs, first try - no chaining and no SCRIPT_DIR collision."
|
|
},
|
|
{
|
|
"command": "pre-commit run --files <changed>",
|
|
"result": "pass",
|
|
"evidence": "shellcheck (which lints each lib in isolation), shfmt, the shebang hook and jscpd all pass."
|
|
},
|
|
{
|
|
"command": "git checkout HEAD -- steam_compatibility.sh, rm its libs, shellcheck -x",
|
|
"result": "pass",
|
|
"evidence": "Restored to 663 lines and clean, with the unrelated libs in that same lib/ directory left in place - checked by listing the directory rather than assuming."
|
|
},
|
|
{
|
|
"command": "bash ~/utils/scripts/check_file_length.sh --all",
|
|
"result": "pass",
|
|
"evidence": "fix_bluetooth.sh and its four libs are all under the cap; the largest is 214 lines."
|
|
}
|
|
],
|
|
"risks": [
|
|
"fix_bluetooth.sh was not run: it reloads btusb, restarts bluetooth and PipeWire, and reconnects devices. Running it would disconnect live audio, which is exactly the mutation decision 6 excludes.",
|
|
"steam_compatibility.sh joins the deferred list at 663 lines - the largest remaining single_use file. Splitting it needs CACHE_MAP passed or rebuilt rather than shared across the seam."
|
|
],
|
|
"rollback": [
|
|
"git revert the commit; fix_bluetooth.sh returns to 720 lines and the four libs disappear.",
|
|
"After rollback, re-run bash -n and shellcheck on the restored script."
|
|
]
|
|
}
|