A truncated manifest.json (--check) or carve index.json (--list) died with a json.decoder traceback, a
non-UTF-8 file with a UnicodeDecodeError, and a well-formed file of the wrong shape with a TypeError or
KeyError, though the tool's other failures are single SystemExit lines. The new load_json guards only the
two reads main opens, naming the file and the reason on one line, and checks index entries just on the keys
--list prints; choose() and translate() keep their plain reads, which #2419 rewrites.
tests/test_first_light_bad_json.py drives the CLI over hand-written temp folders, with no package or
harness; 8 of its 9 tests fail without the change. The tests sit in their own file (moved there in review)
so they don't collide with the open pull requests that extend tests/test_first_light.py.
AI-assisted: written by Qwen (model qwen3.8-gx10-claude-compatible).
Co-Authored-By: Qwen qwen3.8-gx10-claude-compatible <noreply@qwen.ai>