mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 16:14:12 +01:00
870 -> 146 across three libs, plus 247 lines of hosts entries moved from a heredoc into data/android_guardian_blocklist.hosts. A data file draws no linter, unlike extracting an embedded Python program. The installed blocklist is byte-identical: md5 7d3f2550 on both sides. The first attempt cut inside the `case` dispatcher and neither the entry nor a lib parsed. Redone with the case as a hard boundary - this script has no main(), so the case block and the argument parsing that feeds it stay in the entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
18 lines
1.3 KiB
JSON
18 lines
1.3 KiB
JSON
{
|
|
"title": "Split update_android_hosts.sh under the 250-line cap",
|
|
"objective": "Bring the 870-line Android hosts installer under the cap, extracting its embedded blocklist as a data file rather than leaving 247 lines of hosts entries inside a heredoc.",
|
|
"acceptance_criteria": [
|
|
"The entry script and all three new libs are at most 250 lines, and the extracted blocklist is data rather than shell.",
|
|
"The blocklist the module installs is byte-identical: the md5 of the original heredoc body must equal the md5 of the extracted file.",
|
|
"bash -n passes on the entry and every lib. The script dispatches through a `case` rather than a main(), so no seam may fall inside it.",
|
|
"The pre-commit shellcheck hook passes on every file, with no new suppression.",
|
|
"The entry declares SCRIPT_DIR exactly once, and it uses ${BASH_SOURCE[0]} because the libs resolve the data path through it."
|
|
],
|
|
"out_of_scope": [
|
|
"Executing the script; it pairs with a phone over adb and installs a Magisk module.",
|
|
"Changing any blocklist entry.",
|
|
"The other over-cap linux_configuration scripts."
|
|
],
|
|
"verifier": "md5 comparison of the heredoc body against the extracted data file, bash -n on all four shell files, shellcheck -x on the entry and shellcheck on each lib, and check_file_length.sh."
|
|
}
|