Credibility pass: comments state constraints, not development history

A skeptical-cloner review flagged the patterns that read as AI-iteration
residue: test comments and section headers narrating the review process
that produced them, "legacy format" framing in a days-old repo, shadow
re-imports appended without reading file headers, one genuine machine
leftover (FIXTURE_CACHE = FIXTURE_CACHE), and a few register slips.
Every history-narrating comment is rewritten as the timeless invariant
it was guarding, test sections are grouped by behavior, function-local
imports are hoisted, and the README loses its one marketing clause and
heaviest dash runs. No behavior changes; 176 tests unchanged and green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-02 15:08:22 -04:00
parent 92aaa91a49
commit 10f65d8aba
14 changed files with 93 additions and 141 deletions
+3 -3
View File
@@ -89,7 +89,7 @@ def test_parse_object_with_titles_and_unidentified():
assert unidentified[0]["location"] == "top shelf, left of Catan"
def test_parse_legacy_bare_array_still_works():
def test_bare_array_response_shape_parses():
text = '```json\n[{"title_raw": "Catan", "confidence": "high"}]\n```'
titles, unidentified, _ = parse_vision_response(text)
assert titles[0]["title_raw"] == "Catan"
@@ -274,8 +274,8 @@ def test_clean_photo_writes_empty_unidentified(tmp_path):
assert json.loads(cfg.unidentified_path.read_text()) == {}
def test_legacy_array_raw_cache_still_rebuilds(tmp_path):
"""Raw files written before the unidentified feature are bare arrays."""
def test_bare_array_raw_cache_rebuilds(tmp_path):
"""A raw cache file may be a bare title array; it must still rebuild."""
cfg = _cfg(tmp_path)
cfg.photos_dir.mkdir()
_write_image(cfg.photos_dir / "old.jpg")