Commit Graph

2 Commits

Author SHA1 Message Date
84dc48b0d7 first_light: choose() reports a malformed carve index instead of a traceback
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 20:50:48 +01:00
86b5823995 first_light: name the file when a manifest.json or index.json read fails
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>
2026-11-22 14:36:57 -03:00