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: