chore: prepare field.6 review candidate - #37
Merged
BMichaelJ merged 6 commits intoSep 10, 2026
Conversation
BitmapFactory and UIImage.cgImage return the stored sensor buffer and ignore the EXIF orientation tag, while React Native's <Image> and every EXIF-aware viewer apply it. Detection boxes were normalized against one grid and drawn on another: transposed overlays on Android, and on iOS a correct-looking overlay over crops cut from the wrong region, so MiewID embedded the wrong pixels and match scores degraded silently. Android: apply the orientation tag once in loadBitmap, so imageToTensor and cropImage both work from the display grid. iOS: normalize orientation before cropping, matching what imageToTensor already did implicitly through resizeImage. Adds 11 Robolectric tests covering all eight EXIF orientations plus two matchability guards asserting that the MiewID input tensor and the crop region are identical whether a photo is stored upright or rotated. Robolectric's legacy bitmap shadow does not transform pixels for matrix-backed createBitmap, so these run under GraphicsMode.NATIVE in their own class. The iOS tests are written but unverified: this host has no xcodebuild and CI has no iOS test job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both gaps came out of a Codex review of the fix. The orientation tests all called applyExifOrientation and uprightImage directly, so removing the call from loadBitmap or cropImage would have left every one of them green. Adds an end-to-end test through the cropImage bridge method using a real EXIF-tagged JPEG. Verified by unwiring loadBitmap: exactly that test fails, and it passes again once restored. It goes through cropImage rather than imageToTensor because imageToTensor resolves a WritableNativeArray, which needs React Native's JNI that Robolectric does not load. The iOS fixtures used UIGraphicsImageRenderer's default screen scale while rewrapping the buffer at scale 1, so a "4x2" image is an 8x4 or 12x6 buffer on a 2x or 3x simulator and the dimension assertions would fail there despite correct production code. Both fixtures now render at an explicit scale of 1. Android: 12 orientation tests pass, whole suite green. The iOS tests remain unverified on this host. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Records the verdict, the two Major test gaps and how each was closed, the two Minor items deferred with reasoning, and the open gaps -- chiefly that the iOS tests have never run, because this host has no xcodebuild and CI has no iOS test job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Publish the exact source of the already built and Pixel-tested field.6 candidate,
41c2dca0f5c1104f4246e7e81ca29525e8cf88ac, without changing the signed APK.Draft: depends on #35. This integration overlaps the EXIF changes and review
follow-ups in #35; it is not a second implementation or a request to bypass that
review. #34 is already merged by Jason. Keep this PR draft until #35's human
review is complete and the integration is reconciled with
wildlife-reid.Any later runtime source change requires a new verified build.
with EXIF-upright processing and native test coverage from fix: put detector, overlay, and crop on one EXIF-upright grid #35.
0.1.0-field.6/ Android code1787551547.weight, backend, production download behavior, or old-observation migration work.
Type of Change
Screenshots / Screen Recordings
Android
The already approved before/after images are in #34. New field.6 upright,
rotated and mirrored test screenshots remain local; no new image publication
is included in this push. There is no additional UI redesign in this candidate.
iOS
Native simulator test evidence comes from the PR runs below. No physical iPhone
or simulator UI screenshots are claimed.
Checklist
General
Testing
npm testlocally (Windows cannot execute its iOS stage)Local combined gates: 110 focused tests, all 67 Jest suites / 1,031 tests,
30 Android native tests, TypeScript, JS/Android lint, and signed ARM64 release
build passed. The installed APK and ZIP have not been rebuilt for this push.
PR #34 head
65cbaaa: all four checks green in run34487558000, including48 nativeiOS tests. PR #35 head
0b0a8ab: all four checks green in run34487570937,including53 native iOS tests and crop/tensor tests for all eight EXIF orientations.
Those are component-PR runs, not a substitute for this draft PR's own CI.
Pixel validation: all four pre-upgrade records and the66-individual pack retained;
three labelled TEST ONLY records remain pending and unsynced. Upright/rotated/
mirrored gallery imports had aligned boxes, close crop pixels and the same top
match. Offline cold start and catalog Back navigation passed. Settings and the
development app were preserved. No uploads or deletion performed.
React Native Specific
Performance & Models
Security
Related Issues
Depends on #35. Includes #34, already merged as
cb95d52.Additional Notes
d306e3f930857668a5ac626a907b9c6ea452f9895c871c71c7fd4796c8261fae.f4464e26c5d0932f59f8a8667b1d35f1ccc59794b14bcf78ad034ef3ca2c84d2.by upgrading. No silent reprocessing or data clearing.
and new pack download checks remain open. Threshold calibration is separate.
no release publication, bundle distribution, merge or auto-merge is authorized.