fix(reports): attached flight with unrecognized aircraft shows model, not 'Unknown'#34
Merged
Merged
Conversation
An attached flight whose serial doesn't match a fleet aircraft (aircraft_id NULL under the strict ADR-0007 serial-first matcher) was labelled 'Unknown' in the LLM prompt and omitted from the PDF 'Aircraft used' section — so a DJI Avata 2 the operator flew and attached vanished from the client report. New _aircraft_label() fallback chain: linked fleet model_name -> live flight drone_name/drone_model -> cache -> 'Unknown' only as last resort. Used by both the LLM aggregation and the PDF section. ADR-0007 matcher untouched; ADR-0029 altitude guard untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BigBill1418
added a commit
that referenced
this pull request
Jul 3, 2026
…oy note [skip-deploy] (#35) Documents the full incident: root cause (blank fleet serial + ADR-0007 strict matcher), the code fix (PR #34), the prod data remediation (serial registration + backfill of 12 flights/4 junction rows, with SQL audit trail), the standing rule to register drone serials, and the .deployer-disabled hand-deploy learning. Co-authored-by: Bill Barnard <me@barnardHQ.com> Co-authored-by: Claude Fable 5 <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.
A DJI Avata 2 the operator flew + attached was missing from the client report. Root cause: the Avata 2 fleet record has a blank serial, so the strict serial-first matcher (ADR-0007) left aircraft_id NULL, and the report rendered 'Unknown' (LLM) / omitted it (PDF). Fix: fallback chain to the parsed drone_model so an attached flight is never anonymized/dropped. Test: 2 failed -> 34 passed. ADR-0007 + ADR-0029 untouched. Data remediation (register the serial) is separate.