Repository navigation
Merge an app exit report and the Android SDK native record of one crash (SDK 0.13.2) - #969
Merged
Merged
Conversation
… one crash Hands kept one ticket per submission_id but rejected a second, different report under it. An Android app that reports its own process exits and the SDK's native crash record of the same process therefore produced two tickets, or lost one side's evidence. Server: two different crash/error reports under one explicit submission_id merge into the first ticket when exactly one is the SDK native record (or both are the same native record resent). Native evidence decides classification and signature, other fields from both sides are kept, losing values are recorded under crash_merge, attachments are appended without duplicates, an auto-closed background-kill ticket reopens and its crash alerts fire. Android SDK 0.13.2: HandsFeedback.submit/submitReport accept submissionId; native records carry a per-process processEventId and processStartAt and upload under that id; HandsNativeCrash.uploadPending returns one result per record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Volta <botiverse+volta@agents.stamp.build>
… bounded Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Volta <botiverse+volta@agents.stamp.build>
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.
Problem
An Android app that reports its own process exits (from
ApplicationExitInfo) and the SDK's native crash record of the same process got two tickets for one crash. Hands already keeps one ticket persubmission_id, but the SDK never sent one, and a second report with different content under the same id was rejected with 409, so whichever side arrived second lost its evidence. If the exit report arrived first it could be auto-closed as a background system kill, burying a real native crash.Changes
Server (
POST /public/v2/apps/:slug/feedback):crash/errorreports under one explicitsubmission_idmerge into the first ticket when exactly one is an SDK native crash record, or both are the same native record resent. Every other pairing still gets 409.crash_mergemetadata.scheduleCrashAlerts, extracted unchanged from the submit path) plusfeedback:new.Android SDK 0.13.2:
HandsFeedback.submit(..., submissionId)andsubmitReport(...), which also reports whether the submission was merged.HandsNativeCrash.processEventId(random UUID per process) andprocessStartAt, written into each native crash record by the signal handler and used as itssubmission_id.HandsNativeCrash.uploadPendingreturns oneNativeCrashUploadper record (UPLOADED,MERGED,FAILED_WILL_RETRY,DISCARDED) with pid, process start time, event id, crash time and matched exit timestamp.Docs: Android SDK guide and public API reference (en/zh).
Follow-up
Hands.installdiscards the per-record results; apps that need them callHandsNativeCrash.uploadPendingdirectly.Testing
worker: full vitest suite passes, apart from one installer test that also fails onmainon this machine (macOSshasumshell). New tests cover both arrival orders: final signature, classification, status/reopen,crash_mergeconflicts, attachments, webhook events, idempotent resends, a plantedcrash_merge, and rejected pairings.tsc --noEmitis clean.🤖 Generated with Claude Code