mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 18:54:03 +01:00
503 -> 132 across three parts. The seven mtk_root consumers are untouched because the path they source is unchanged. Identical 28-function set before and after, checked after each of the two carves. The `<<<` in this file are here-strings, not heredocs - worth confirming rather than assuming, after enforce_vbox_hosts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
39 lines
2.0 KiB
JSON
39 lines
2.0 KiB
JSON
{
|
|
"intent": "Split scripts/lib/mtk_common.sh with the same entry-point pattern used for common.sh.",
|
|
"scope": [
|
|
"linux_configuration/scripts/lib/mtk_common.sh (503 -> 132)",
|
|
"lib/mtk_device.sh, mtk_classify.sh, mtk_partitions.sh (new)",
|
|
"Non-goal: no behaviour change, no change to the public surface"
|
|
],
|
|
"changes": [
|
|
"mtk_common.sh keeps its logging, path and sanitising helpers and sources three new parts: adb/device selection, device classification, and partition discovery.",
|
|
"The seven mtk_root scripts that source it are untouched, because the path they source is unchanged.",
|
|
"The `<<<` occurrences in this file are here-strings, not heredocs, so the heredoc hazard did not apply - worth checking rather than assuming, given the enforce_vbox_hosts failure."
|
|
],
|
|
"verification": [
|
|
{
|
|
"command": "source mtk_common.sh in a subshell and diff `declare -F` before and after",
|
|
"result": "pass",
|
|
"evidence": "Identical 28-function set, checked after each of the two carves rather than only at the end."
|
|
},
|
|
{
|
|
"command": "shellcheck -x mtk_common.sh and shellcheck on each part",
|
|
"result": "pass",
|
|
"evidence": "Zero findings, no suppression."
|
|
},
|
|
{
|
|
"command": "meta/scripts/verify_shell_split.sh on 20-dump-stock.sh and install.sh",
|
|
"result": "pass",
|
|
"evidence": "Both consumers report 'libs sourced, functions defined' - they source mtk_common.sh from a sibling directory and still resolve everything through the new chain."
|
|
}
|
|
],
|
|
"risks": [
|
|
"None of the seven mtk_root consumers was executed: they talk to a phone over USB. The function-set diff plus the stubbed runs are the available evidence.",
|
|
"_MTK_LIB_DIR uses ${BASH_SOURCE[0]} because this file is only ever sourced; $0 would point at the calling script."
|
|
],
|
|
"rollback": [
|
|
"git revert the commit; mtk_common.sh returns to 503 lines and the three parts disappear.",
|
|
"After rollback, re-run the declare -F diff and expect the same 28 functions."
|
|
]
|
|
}
|