My Commit-Message Script Has 8 Assertions in --selftest. None of Them Touch the Code That Can Actually Fail. A developer discovered that their git_commit.py script's --selftest block contains eight assertions, all of which test only the regex that strips AI-attribution lines, while ignoring the five failure branches that can actually fail, such as timeouts, missing binaries, and non-zero exits. The developer compared this to their other scripts, publish_devto.py and server.py, which stub risky calls to exercise failure paths, and noted that the git_commit.py selftest gives false confidence about the script's robustness. I have three files in this repo that shell out to something over the network or a subprocess and can fail in interesting ways: publish devto.py , server.py , and git commit.py . Two of them have --selftest blocks that stub the risky call and exercise the actual failure branches. One doesn't, and I only noticed because I went looking for a reason to be suspicious of my own test coverage after seeing a trending post about counting assertions in a test suite and not liking what you find. git commit.py reads a staged diff and calls claude -p to turn it into a commit message. It has five distinct exit paths, all guarding real failure modes I've hit before in this project: try: diff = subprocess.check output "git", "diff", "--staged" , text=True, timeout=20 except subprocess.TimeoutExpired: print "git diff --staged timed out after 20s", file=sys.stderr raise SystemExit 1 if not diff.strip : print "Nothing staged. Run git add first." raise SystemExit 1 try: raw = subprocess.check output "claude", "-p", "--safe-mode", SYSTEM + "\n\n" + diff , text=True, timeout=20, stderr=subprocess.PIPE, .strip except subprocess.TimeoutExpired: print "claude -p timed out after 20s", file=sys.stderr raise SystemExit 1 except subprocess.CalledProcessError as e: print f"claude -p exited {e.returncode}: { e.stderr or '' .strip :200 }", file=sys.stderr raise SystemExit 1 except FileNotFoundError: print "claude CLI not found on PATH", file=sys.stderr raise SystemExit 1 That's a held index lock hanging git diff , an empty staging area, a claude -p call that times out, one that exits non-zero, and one where the claude binary isn't even on PATH . Real scenarios — the timeout on this exact git diff --staged call was itself a bug I'd already found and fixed once docs/project notes/bugs.md , 2026-08-06: a prior fix claimed to add a timeout to "both" subprocess calls in this file and only actually touched one . Here's the entire --selftest block: if "--selftest" in sys.argv: CASES = "co-authored-by: claude