feat: post-flight reconciliation review (R2) - #122
Merged
Conversation
Live detection has a ceiling: prompts auto-dismiss after 20 s while the pilot is hand-flying the circuit — the corpus shows sessions with 2 of 7 landings confirmed. At END FLIGHT the saved track is re-segmented offline through the SAME v2 detector core (clock pinned per sample, end-of-flight flush included; no second implementation to drift) and diffed against the confirmed events: - detected + recorded within 120 s = one physical event (same type → agreement, different type → a type-mismatch row: the <15 ft ambiguity band's human resolution point); - detected-only rows = the missed-prompt case; - recorded events the track can't see stay confirmed — the pilot's word beats the track — unless they duplicate another landing within 60 s (physically impossible; the corpus's double-taps are 7–35 s apart), which is refused. The review sheet (FlightReconciliationView, over Home, only when events would change) applies the track's reading in one tap, lets every row's type be overridden (TG↔GA↔FS) and detected-only rows be excluded; "keep as recorded" leaves the logbook untouched. Confirmed events are never changed silently. Track-derived block times (the first-move / final-stillness rules validated against the club's entries) back-fill flights whose engine checklist was never tapped — 19 of 53 corpus flights had no block off. Back-fill is additive and happens without ceremony when there is no event diff. Tests drive the engine with the 7-landing strong-wind circuit fixture plus synthetic tracks: missed-events diff + apply, full-agreement no-diff, type-mismatch single row, double-tap refusal, back-fill only-when-missing, block-time rules. EN/FR strings included. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Verification summary:
|
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.
Post-flight reconciliation (R2 — the "almost-perfect" lever)
Stacked on #121 (flight-event detection v2). Implements recommendation R2 of the 53-flight analysis under decision D2: review diff, never silently change confirmed events.
Why
Live detection has a ceiling that no detector fixes: confirmation prompts auto-dismiss after 20 s while the pilot is hand-flying the circuit, and single-pilot ops will always miss some. The corpus shows the damage — whole circuit sessions with 2 of 7 landings confirmed, flights whose only landing was lost to an early recording stop, and 19 of 53 flights with no block-off because the engine checklist was never tapped.
What
FlightReconciliation(engine): at END FLIGHT, re-runs the v2 detector core over the whole saved track offline (clock pinned to each sample, end-of-flight flush included — the same code path pinned by the corpus fixtures), then builds a diff against the confirmed events:FlightReconciliationView(review sheet, presented over Home right after END FLIGHT, only when the diff would change events):AppState:
pendingReconciliation+applyReconciliation/keepRecordedReconciliation/backfillBlockTimes— apply rewrites the saved flight's event arrays/counts andlandingTime(last full stop), recomputes summary stats, persists and re-syncs.Tests
FlightReconciliationTestsdrives the engine with a real corpus fixture (the 7-landing strong-wind circuit session) plus synthetic tracks:landingTime= last FS.Full suite green; EN/FR strings included.
Notes
FlightEventDetector— there is deliberately no second detector implementation to drift out of sync.🤖 Generated with Claude Code