mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 17:34:04 +01:00
Held until last on purpose: all five enforcer splits this session grew
deploy.sh's two hardcoded file lists, so cutting it earlier would have left
every "add to BOTH lists" step pointing at a stale location. Those lists are
final as of the focus_ctl commit, so this is now safe.
do_deploy was 421 lines -- over the cap on its own, so moving it whole would
have achieved nothing. It is cut at the phase boundaries it already prints
("[4/7] Uploading scripts...", "[5/7] Setting permissions...") plus two more
inside the push phase, giving seven named functions instead of one wall.
The two hardcoded lists now live in SEPARATE files, which is the real risk
this commit introduces. deploy_phases.sh holds the push list and
deploy_install.sh the cp list; each header names the other and says what
happens when they drift -- the file is staged, never lands, and whatever
sources it fails to start with no obvious cause. Checked in both directions
after the move: the only asymmetry is config_secrets.sh, which a conditional
block handles so the phone's real coordinates survive a deploy. That was
asymmetric at HEAD too.
check_coords now RETURNS whether the coordinates are placeholders instead of
assigning $NEEDS_GPS_FETCH. The flag is written in deploy.sh and read in
deploy_phases.sh, so assigning it from deploy_gps.sh as well left that file
writing a global it never reads. Behaviour proven identical to HEAD: real
coords -> 0, placeholders -> 1.
NO TESTS, and that is a deliberate limit rather than an omission. Every
phase here is a sequence of adb calls against a real device; a stub layer
deep enough to mean anything would be modelling the phone, not testing the
script. Verification is that deploy.sh parses, sources all six libraries and
reaches its usage message -- which catches a broken split, not a wrong one.
515 assertions across ten phone suites still pass; run_phone.sh --help
exits 0.
Over-cap 16 -> 15, and NO phone_focus_mode file is over the cap any more.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
20 lines
2.1 KiB
JSON
20 lines
2.1 KiB
JSON
{
|
|
"title": "Split deploy.sh, the last over-cap file in phone_focus_mode",
|
|
"objective": "Take deploy.sh from 875 lines to under the repo's 250-line cap. It goes last by design: every enforcer split this session grew its two hardcoded file lists, so splitting it earlier would have left the 'add to BOTH lists' step pointing at a stale location.",
|
|
"acceptance_criteria": [
|
|
"bash meta/scripts/check_file_length.sh --all lists NO file under phone_focus_mode/, finishing that directory.",
|
|
"The two hardcoded file lists stay in exact correspondence after being moved into different files, and each carries a comment saying where its counterpart now lives.",
|
|
"do_deploy, at 421 lines, is cut at the phase boundaries it already prints, so each phase is a named function rather than an arbitrary line range.",
|
|
"Any function that stops being verbatim must have its behaviour proven unchanged against the pre-split version.",
|
|
"shellcheck passes on each file individually, with no -x and no disable directive; a global written in one file and read in another must not leave either file assigning something it never reads.",
|
|
"deploy.sh still runs: it reaches its usage message, which requires the whole source chain and config.sh to resolve.",
|
|
"Every phone-side test suite still passes at its previous count."
|
|
],
|
|
"out_of_scope": [
|
|
"Deploying to the phone; there is no device in this session.",
|
|
"Changing what is deployed, in what order, or the conditional handling of config_secrets.sh (which is deliberately asymmetric between the two lists and was so before this change).",
|
|
"Writing a test harness for the deploy phases themselves: every one of them is an adb call against a real device, and a stub layer deep enough to be meaningful would model the phone rather than test the script."
|
|
],
|
|
"verifier": "timeout 30 bash phone_focus_mode/deploy.sh (expects the usage message), plus check_file_length.sh --all showing no phone_focus_mode entry, plus the two-list parity check, plus every phone test suite at its previous count, plus pre-commit run --files on the touched files."
|
|
}
|