
juliaandClaude Sonnet 4.6
7fc8204924
fix: apply code-review findings to import_fruits script and tests
- find_images: verify exact fruit_id prefix (stem-parse before _s0.) to
prevent cross-fruit image contamination (e.g. mitschurins steals
mitschurins_fruchtbare images)
- DATA_DIR uses os.path.abspath to handle symlinks / relative invocation
- counts["images"] derived from IMAGE_DIRS constant, not hardcoded keys
- counts["warnings"] incremented on missing-id/name skip (was missing)
- UPSERT preserves existing comment (comment = fruits.comment, not NULL)
- Print summary and rollback moved inside try/except to avoid NameError
- Remove dead XML_PATH constant
- Tests: add tearDown to clean up tmpdir; fix vacuous _tn exclusion test
to include positive-control _s0 file; add prefix-collision regression test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>