mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 19:14:02 +01:00
Eight libs from the largest script in linux_configuration: five in the first pass, then three of those carved again since they landed at 272, 292 and 277. Fixed three more unguarded cd /var/www/nextcloud calls, each right before an occ command - the installer would have run against whatever directory the caller was in. Third script with this bug. check_and_enable_services.sh is reverted and stays at 1337. Its SERVICE_STATUS array is declared once and written by every check_* function, so any lib holding them fails SC2034 alone. Fourth file deferred for shared state, and the clearest: the script is an accumulator, so there is no seam anywhere in it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
20 lines
1.5 KiB
JSON
20 lines
1.5 KiB
JSON
{
|
|
"title": "Split setup_nextcloud_raspberry.sh under the cap, deferring check_and_enable_services.sh",
|
|
"objective": "Bring the largest linux_configuration script (1383 lines) under the 250-line cap, and confirm that a script built around one shared accumulator array cannot be split without a suppression.",
|
|
"acceptance_criteria": [
|
|
"The entry script and all eight new libs are at most 250 lines.",
|
|
"The pre-commit shellcheck hook passes on every touched file, with no new suppression and no disable directive.",
|
|
"No lib sources a sibling: the entry script sources all eight directly.",
|
|
"The stubbed run reports every moved function as defined.",
|
|
"Every unguarded cd exposed by the split is fixed rather than suppressed.",
|
|
"No script is executed. This one flashes SD cards, installs packages over SSH and configures MariaDB, PHP and Apache.",
|
|
"check_and_enable_services.sh is fully restored to 1337 lines, with the unrelated lib already in that directory left in place."
|
|
],
|
|
"out_of_scope": [
|
|
"Executing any flash, install or configure step.",
|
|
"check_and_enable_services.sh, whose SERVICE_STATUS associative array is declared in one prospective lib and written by every other.",
|
|
"Changing what any script does when run, beyond the cd guards."
|
|
],
|
|
"verifier": "meta/scripts/verify_shell_split.sh, plus pre-commit run --files over all touched files, plus check_file_length.sh, plus ls of the shared lib/ directory after the revert."
|
|
}
|