mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-23 20:46:28 +01:00
Renames this repo's markdown onto README.md / CLAUDE*.md / DOCS*.md / TODO*.md so a future session can tell a live task from a finished record without reading the file to find out. TODO files carry the literal "REMOVE ME AFTER FINISH" and are deleted when the work lands. Enforced by the md-naming pre-commit hook and CI workflow, both delegating to the shared gate in kuhyx/utils so this repo's idea of a valid name cannot drift from every other repo's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A47aX5DJwmA3QFn3pkEWi7
2.1 KiB
2.1 KiB
Automation safety rules, testing expectations and non-goals
Automation safety rules
Because the phone may appear repeatedly over USB or Wi-Fi, automation must be conservative.
Required safeguards:
- single-instance lock to prevent overlapping runs
- cooldown window so repeated reconnects do not trigger backup storms
- clear separation between lightweight
automode and heavier full-backup behavior - retry and backoff rules for transient ADB failures
- no automatic
fresh-phonerestore without explicit user intent
Testing and verification expectations
The implementation phase should follow strict shell hygiene and repository quality rules.
- use
set -euo pipefail - prefer reusable functions over repeated ADB snippets
- validate parameters and environment clearly
- keep destructive operations explicit and well-logged
- add tests where practical for shell logic or parser behavior
- run
pre-commit run --files <changed-files>before claiming completion
Verification must include:
- shell syntax validation
- targeted script execution in safe modes
- README/help-text verification against the approved user flows
- evidence that backups and monitoring output are actually produced
Constraints and non-goals
The design deliberately does not promise impossible guarantees.
- It cannot make a rooted phone impossible to tamper with locally.
- It cannot safely restore every app’s private data without app-specific risk.
- It should prefer explicit warnings over pretending unsupported restores are safe.
The goal is a robust, repeatable, operator-friendly recovery and monitoring system, not an infallible anti-root fortress.
Open implementation notes
- Reuse code patterns already present in
linux_configuration/scripts/utils/andpython_pkg/screen_locker/_phone_verification.pywhere they help with ADB detection and wireless reconnection. - Keep the wrapper stable even if the internal phone implementation evolves.
- Preserve the existing
deploy.shvalue rather than rewriting it from scratch. - Make backup scope declarative so expanding or narrowing coverage does not require editing core shell control flow.