Conversation
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
Where could mistake places recorded during a flight for GPS drift and offer a whole-day correction that hid later destinations. This change recognizes sustained flight movement per recording device, waits for GPS evidence of arrival, and reviews exact sample edits while preserving raw observations and later visits.
Locations and correction screens share localized flight status. Pending flights stay accessible without actionable badges or correction notifications, and manual day editing remains available.
Why
Flight classification, arrival confidence, and correction availability need to use the same raw evidence. An elapsed timeout, missing updates, restart, or midnight cannot establish landing. GPS remains the baseline for older recordings; valid speed and altitude measurements add context.
Review focus
Backup format advances from v5 to v6 for optional motion and correction history. Legacy whole-day flight/drift resolution APIs are replaced by sample correction proposals.
Compatibility
The offline upgrader converts v1–v5 archives to v6 with unknown motion and empty correction history. Export preserves raw samples and revision identities/timestamps, including tombstones; Merge and Replace restore correction history with their generation semantics. Existing authoritative day overrides remain unchanged, and Reset to GPS atomically clears the override and writes fresh tombstones for every affected GPS sample, including samples with no known correction or an existing reset.
Older app builds do not consume sample correction revisions and can report different attribution until updated. The added SwiftData/CloudKit fields and revision entity require the normal CloudKit schema rollout; local tests do not verify live CloudKit deployment or mixed-build behavior.
Thresholds are conservative initial policy. Sparse observations or slower aircraft may remain pending; uncertainty preserves evidence and manual editing. Connectivity inference and new background sensors are outside this change.
Testing
./test WhereCoreTestspassed 639 tests, followed by 28 assessment/coordinator/scanner tests after extending duplicate detection across days. New regressions cover duplicate synced rows through Apply, conflicting identities across days, sparse layover preservation, repeated resets, and delayed corrections after reset or clear. Architecture checks (16 rules), backup-upgrader tests (10 tests / 30 assertions), formatting, symbols, and catalog lint passed. No UI code or references changed in these fixes, so snapshots were not repeated../test --all: 2,087 unit tests passed after mergingorigin/mainon Xcode build27A266a.