mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-10 20:07:14 +01:00
`adb install -r` preserves app data and phone_deploy already refuses every path that would not, but "preserved" is a property of the happy path -- a failed install or a later wipe leaves unpublished entries existing nowhere else. The log is CRDT-synced precisely so a recoverable copy exists, so the deploy now checks that one does before touching the device. The obvious device-side signal does not work and would be a gate that can never pass: the app records a successful tick through SyncHealth, which writes to SharedPreferences (app-private, unreadable over ADB on a release build), and it only writes to logcat when a sync *fails*. So the check is remote-side -- pull the shared log and assert it holds recent entries, which answers "is there a copy off the device" directly. Advisory by default; SYNC_GATE_STRICT=1 makes it block (exit 38). A network outage must not stop a fix reaching the phone. The shell half lives in ~/.claude/scripts/lib/phone_deploy_sync.sh. Verified against the real phone: passes when a peer is current, skips cleanly for an unsynced or not-yet-installed app, and blocks with exit 38 in strict mode. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QQpCiPaSbyRpwsLkH3dgsX |
||
|---|---|---|
| .. | ||
| bump_patch_version.sh | ||
| check_file_length.sh | ||
| check_no_crdt_sync_override.sh | ||
| check_patch_targets.py | ||
| check_requirements_sync.py | ||
| ci_mirror.sh | ||
| probe_kuchnia_auth.py | ||
| probe_kuchnia_details.py | ||
| probe_kuchnia_shape.py | ||
| probe_kuchnia.py | ||
| setup_mcp.sh | ||
| sync_freshness.py | ||