Add stage and source fields to file-validation-error telemetry - #137
Merged
Merged
Conversation
Adds two structural fields to the file-validation-error analytics
payload so we can split the remaining bucket without depending on
string-matching:
- stage: 'init' | 'storage' | 'mount' | 'exec' | 'download' | 'parse'
| 'datareader-error' — which awaited step in handleFileUpload
threw. Tracked via a let-binding updated before each major await.
- source: 'upload' | 'reselect' | 'demo' | 'repair' — which entry point
triggered the validation. Derived from the existing event flags;
handleUseRepaired now passes isRepaired: true so the repair entry
point is distinguishable.
This gives an immediate axis-by-axis view of the remaining unknown
events (likely infra: Aioli mount/exec failures, IndexedDB quota) vs
data (HyPhy datareader errors we haven't pattern-matched yet) without
waiting for the message-field telemetry to accumulate.
stevenweaver
force-pushed
the
improve/file-validation-stage-source-tracking
branch
from
June 9, 2026 01:13
bb15cf7 to
06d5fb2
Compare
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
Follow-up to #136. After last week's classifier expansion + message capture, ~1k validation errors / 30 days still fire and we don't have a clean way to tell upstream-of-HyPhy failures (Aioli mount/exec, IndexedDB quota) apart from downstream user-data failures (HyPhy datareader rejections). String-matching can only get us so far.
This adds two structural fields to the `file-validation-error` payload so the bucket can be split by axis instead:
No fix here, just visibility. Once a week of data comes in, the `stage` × `errorType` cross-tab in Umami should make it obvious whether to expand the classifier (data errors) or chase infra (mount/exec failures).
Test plan
Follow-ups