{ "title": "Deliver the blocklist over DoT and hand the policy to the Kotlin backend", "objective": "Close the two gaps that stopped the unrooted path from working end to end. First, the phone had no way to consume the focus policy: the app now loads a generated JSON asset instead of the app and the shell config drifting apart. Second, the blocklist was only reachable as a hosts file or over plain UDP/53 on the LAN, and the rooted enforcer actively rejected every DoT connection, so a self-hosted DoT resolver could not have worked even if one existed. Success is a resolver that answers filtered queries over TLS, reachable only over WireGuard, with the rooted enforcer permitting exactly that one endpoint and nothing else.", "acceptance_criteria": [ "python3 -m python_pkg.focus_policy renders the policy as JSON and refuses to run against the placeholder coordinates", "The committed focus_owner/assets/policy.json carries no home coordinates, and a test fails if it ever does", "focus_owner parses the asset and displays the real counts on-device, matching config.sh", "An unknown schema_version is rejected rather than partially interpreted", "dns_enforcer.sh inserts an ACCEPT for the trusted resolver BEFORE the blanket 853 REJECT - order is load-bearing, since iptables takes the first match", "expected_rule_count() counts those ACCEPTs, so chain_intact() does not treat the chain as tampered and rebuild it every 20s", "With DNS_TRUSTED_DOT_HOST empty the behaviour is byte-identical to before, so the live rooted phone is unaffected until deployed", "With it set, Private DNS is pinned to that hostname instead of forced off, and user changes are reverted within DNS_CHECK_INTERVAL", "stunnel serves DoT on 853 backed by the Caddy-managed Let's Encrypt certificate, renewed without a second ACME client", "The resolver is bound to the WireGuard address only, and is verifiably unreachable from both LAN and WAN", "A blocked domain returns 0.0.0.0 over DoT while a normal domain resolves" ], "out_of_scope": [ "Device Owner provisioning and the factory reset it requires - the checklist is planning only", "Any enforcement in focus_owner: it reads the policy but applies nothing", "Public exposure of the resolver - deliberately WireGuard-only, no port-forward, no nftables rule", "Deploying the dns_enforcer change to the rooted phone - the code is in, the deploy is not", "Fixing generate_hosts_file.sh, which still comments out unblocks rather than deleting them" ], "verifier": "python3 -m python_pkg.focus_policy (both success and placeholder-rejection paths); cd focus_owner && flutter analyze && flutter test (27 tests, incl. the committed-asset redaction guard); adb install + am start + screenshot showing the parsed policy; shellcheck + shfmt on dns_enforcer.sh, config.sh and setup_dot_resolver.sh; a stubbed-iptables harness asserting rule order, rule counts and the private-DNS pin in both modes; setup_dot_resolver.sh --check; kdig +tls @10.8.0.1 -p 853 for a normal and a blocked domain; ss -lnt plus kdig against the LAN and WAN addresses to prove non-exposure" }