Skip to content

chore: prepare field.6 review candidate - #37

Merged
BMichaelJ merged 6 commits into
WildMeOrg:wildlife-reidfrom
BMichaelJ:chore/field6-review-candidate
Sep 10, 2026
Merged

chore: prepare field.6 review candidate#37
BMichaelJ merged 6 commits into
WildMeOrg:wildlife-reidfrom
BMichaelJ:chore/field6-review-candidate

Conversation

@BMichaelJ

Copy link
Copy Markdown
Collaborator

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.

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

  • Existing code style and conventions preserved
  • Source integration self-reviewed; exact runtime slices compared with the PR heads
  • No new runtime code or dependencies added for this push
  • No new lint errors; existing baseline/deprecation warnings documented

Testing

  • Tested on Pixel 9a, Android 16 with the exact signed candidate
  • Tested on physical iPhone / iOS UI
  • Candidate-specific light/dark matrix beyond the earlier fix: align detection overlays and prepare field.5 #34 checks
  • Combined npm test locally (Windows cannot execute its iOS stage)
  • Focused and release regression tests passed

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 native
iOS 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

  • No new native module or project registration
  • Existing theme/style and virtualized-list patterns retained
  • Image-layout geometry and failed-load recovery have component regressions
  • Full animation/gesture and physical-device matrix on both platforms

Performance & Models

  • Models, APKs, screenshots, raw observations and signing material are not committed
  • Existing download progress and pack-path behavior retained
  • Broader low-memory, GPU failure and content-provider acceptance

Security

  • No credentials, tokens, precise locations or raw user data included
  • Device fixtures kept EXIF orientation but removed GPS/private metadata

Related Issues

Depends on #35. Includes #34, already merged as cb95d52.

Additional Notes

  • APK SHA-256: d306e3f930857668a5ac626a907b9c6ea452f9895c871c71c7fd4796c8261fae.
  • ZIP SHA-256: f4464e26c5d0932f59f8a8667b1d35f1ccc59794b14bcf78ad034ef3ca2c84d2.
  • Existing incorrectly processed observations/crops/embeddings are not repaired
    by upgrading. No silent reprocessing or data clearing.
  • Failed-photo behavior is component-tested, not simulated by deleting device files.
  • Physical iPhone, Android9/BlueStacks, camera/provider variation, fresh sign-in
    and new pack download checks remain open. Threshold calibration is separate.
  • This push publishes source only. The installer and tester ZIP remain local;
    no release publication, bundle distribution, merge or auto-merge is authorized.

JasonWildMe and others added 6 commits September 9, 2026 22:49
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>

@JasonWildMe JasonWildMe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@BMichaelJ
BMichaelJ marked this pull request as ready for review September 10, 2026 15:58
@BMichaelJ
BMichaelJ merged commit 847c4f3 into WildMeOrg:wildlife-reid Sep 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants