testsAndMisc/phone_focus_mode/lib
Krzysztof kuhy Rudnicki a174b2a3c4 meta: measurable shell coverage, and dns_iptables.sh at 100%
kcov works here once invoked correctly, so shell coverage is measurable
after all. shell_coverage.sh wraps it as a gate; the XML parsing lives in
shell_coverage_report.py per the rule against inlining another language's
logic in a shell script.

Two kcov traps are documented in the wrapper because both fail silently.
It must be handed the test script DIRECTLY: given `bash script.sh` it
instruments the bash binary, finds no shell source, and reports 0/0 at
0.00% -- indistinguishable from "nothing is covered". And per-line detail
exists only in cov.xml; coverage.json carries the percentage alone, so it
cannot say which lines are missing.

First measurement put dns_iptables.sh at 68/74 = 91.89%, with all six
uncovered lines in error and edge branches: chain creation failing, jump
insertion failing, the stale-jump de-dupe log, and the v6 trusted-resolver
ACCEPT. The stub grew failure injection and jump seeding to reach them,
and four new cases take it to 74/74 = 100.00%.

The gate fails closed: deleting the three ensure_chain failure cases drops
it to 93.24%, names lines 23, 24, 37, 40, 41, and exits 1.

Not wired into pre-commit -- kcov is absent on CI, and most shell files
here have no test at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-17 15:29:08 +02:00
..
tests meta: measurable shell coverage, and dns_iptables.sh at 100% 2026-08-17 15:29:08 +02:00
adb_common.sh phone_focus_mode: split adb_common.sh 346 -> 155 + two libs 2026-08-17 10:31:34 +02:00
adb_locking.sh phone_focus_mode: split adb_common.sh 346 -> 155 + two libs 2026-08-17 10:31:34 +02:00
adb_trusted.sh phone_focus_mode: split adb_common.sh 346 -> 155 + two libs 2026-08-17 10:31:34 +02:00
backup.sh feat(phone-focus): add recovery workflow, automation scripts, and docs 2026-05-01 19:07:27 +02:00
monitor_checks_health.sh monitor: split 449 -> 215 + 138 + 136, partitioned by probe kind 2026-08-17 14:59:41 +02:00
monitor_checks_policy.sh monitor: split 449 -> 215 + 138 + 136, partitioned by probe kind 2026-08-17 14:59:41 +02:00
monitor_report.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
monitor.sh monitor: split 449 -> 215 + 138 + 136, partitioned by probe kind 2026-08-17 14:59:41 +02:00
restore.sh feat(phone-focus): add recovery workflow, automation scripts, and docs 2026-05-01 19:07:27 +02:00