mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 21:27:02 +01:00
The on-device focus enforcer was overheating the phone by rebuilding firewall rules every tick. State-gate the work instead: - dns_enforcer.sh: only rebuild the DNS chain when it's missing, detached from OUTPUT, or the wrong rule count (chain_intact/expected_rule_count), instead of flushing+reinserting ~50-100 rules every tick (~50% netd CPU). - config.sh: throttle CURFEW_NET_REASSERT_INTERVAL 1s -> 15s (1s forked iptables every second all night, overheating); also whitelist com.kuhy.wake_alarm_sync (general + curfew-night lists). - focus_daemon.sh: build the blocked-system-apps file once at startup and memoize is_allowed() per tick. - deploy.sh: drop `su --mount-master` (removed in Magisk v26+). - SKILL.md: document the state-change-gate polling pattern. Verification: shellcheck clean; no-polling-antipatterns + evidence/contract hooks pass. Evidence + contract artifacts included. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RRCdR4D8SaVrN2xraMQxM |
||
|---|---|---|
| .. | ||
| agents | ||
| skills | ||
| workflows | ||
| copilot-instructions.md | ||