Repository navigation
heronin: the place model and species table (K2a0) - #4
Conversation
Signed-off-by: fizzy pop-os-codex-1 <slot+pop-os-codex-1@fizzy.invalid>
|
Follow-ups: |
Signed-off-by: fizzy pop-os-codex-4 <slot+pop-os-codex-4@fizzy.invalid>
|
Follow-ups: |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TkjusRrceWCuW39qhZTcwh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TkjusRrceWCuW39qhZTcwh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TkjusRrceWCuW39qhZTcwh
model: recognize saved places near bird photos
In plain words
Bird photos can carry their own location while keeping a separate record of where the phone was during import. Saved places now have names and boundaries, so nearby photos can be associated with a familiar place. A starter list describes twelve bird species.
What changes
What you will notice
Nothing visible: internal. This prepares named photo locations and species information for later screens and import work.
How we know it works
Tests check measured distances, crossing the date line, radius boundaries, nearest-place selection, all three location-label outcomes, JSON preservation, and twelve unique species. All 12 model/theme tests and all 3 public-rule tests pass. Formatting, native build, web build, and public-content checks also pass.
How this serves fizzy
Phones and tablets: keeping photo locations separate from phone positions prepares accurate location labels for mobile use.
For agents: technical summary
Goal
Provide saved named places, independent import fixes, distance and labeling helpers, and the twelve-species lookup without changing app behavior.
What changed and why
The named model module is available to the app and model tests. Place is now a saved location with an ID, name, and default 150 m radius. Photo GPS remains optional and gains an independent optional Fix. Haversine distance clamps rounding error before the inverse sine. Species lookup returns a matching value or null. New behavioral tests live in model/places_tests.zig and are imported by model/model_tests.zig.
How it was verified
All five requested gates passed. Direct execution of the generated test executables confirmed 12 model/theme tests, including the five new places/species cases, and 3 public-rule tests passed. git diff --check passed. Code changes total 62 added/deleted non-test lines against the starting HEAD, including untracked source files.
Not done / follow-ups
No views, imports, stores, network, or cluster work. The requested origin/main size comparison could not run because that ref is absent; report.md records the fallback count. This checkout contains no docs/VISION.md, so the required upstream vision anchor could not be validated locally.
Part of fizzyedit/work#1045