mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 20:34:02 +01:00
setup_offline_docs.sh 713 -> 121 across six libs, carved one language at a time since the first cut left offline_cpp at 545. optimize_arch_ desktop.sh 623 -> 118. Two recurring traps again: a script with no SCRIPT_DIR at all, and libs that chained rather than being sourced from the entry. Both now checked for routinely. libre_translate.sh is reverted and stays at 488. Exporting GENERATED to fix one SC2034 revealed eighteen more - when a fix uncovers more of the same, the seam is imaginary, not the fix wrong. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
46 lines
2.9 KiB
JSON
46 lines
2.9 KiB
JSON
{
|
|
"intent": "Split two more linux_configuration scripts under the cap, and defer a third whose globals cross every candidate seam.",
|
|
"scope": [
|
|
"single_use/utils/setup_offline_docs.sh (713 -> 121) + offline_python, offline_cpp, offline_js, offline_rust, offline_index, offline_status",
|
|
"single_use/fixes/optimize_arch_desktop.sh (623 -> 118) + arch_cpu, arch_sysctl, arch_hardware",
|
|
"Deferred and fully restored: misc/testsAndMisc-bash/libre_translate.sh (488)",
|
|
"Non-goal: no script executed"
|
|
],
|
|
"changes": [
|
|
"setup_offline_docs.sh needed six libs, carved one language at a time: the first cut left offline_cpp at 545 lines because it had swallowed JS and Rust too.",
|
|
"setup_offline_docs.sh had no SCRIPT_DIR at all - the second script in this effort where the split had to add one.",
|
|
"optimize_arch_desktop.sh's libs had chained (arch_cpu sourcing the other two); flattened so the entry sources all three. Fourth instance of that bug.",
|
|
"libre_translate.sh was reverted. Its API_KEY, GENERATED and seventeen other globals are written on one side of any seam and read on the other. Exporting GENERATED fixed one warning and revealed eighteen more, which is the signal that the seam is imaginary rather than that the fix is wrong."
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "meta/scripts/verify_shell_split.sh per script",
|
|
"result": "fail then pass",
|
|
"evidence": "Both now report 'libs sourced, functions defined'. Three real failures first: a missing SCRIPT_DIR, the chained arch libs, and the libre_translate globals."
|
|
},
|
|
{
|
|
"command": "pre-commit run --files <11 changed files>",
|
|
"result": "pass",
|
|
"evidence": "shellcheck - which lints each lib in isolation - shfmt, the shebang hook and jscpd all pass."
|
|
},
|
|
{
|
|
"command": "git checkout HEAD -- libre_translate.sh, rm its libs, shellcheck -x, ls the lib dir",
|
|
"result": "pass",
|
|
"evidence": "Restored to 488 lines and clean, with unity_handler.sh from an earlier commit still present - checked by listing rather than assumed."
|
|
},
|
|
{
|
|
"command": "bash ~/utils/scripts/check_file_length.sh --all",
|
|
"result": "pass",
|
|
"evidence": "Neither entry script nor any of the seven libs is listed. Repo total is 90, down from 183."
|
|
}
|
|
],
|
|
"risks": [
|
|
"Neither script was run: one downloads documentation archives over the network, the other writes sysctl, udev and NVIDIA settings. The stubbed run proves reachability, not behaviour.",
|
|
"libre_translate.sh joins the deferred list. Unlike the others it is not one shared array but a broad style - nearly twenty globals - so splitting it means converting them to parameters or accepting a suppression."
|
|
],
|
|
"rollback": [
|
|
"git revert the commit; both scripts return to 713 and 623 lines and the seven libs disappear.",
|
|
"After rollback, re-run bash -n and shellcheck on the restored scripts."
|
|
]
|
|
}
|