feat: integrate Sentry into QR account sync receive flow#33316
feat: integrate Sentry into QR account sync receive flow#33316grvgoel81 wants to merge 5 commits into
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 83d5cd9. Configure here.
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No functional user flows are modified. The QR sync import flow, onboarding completion, and QR scanner behavior remain identical. A grep of the smoke test suite confirms there are no E2E smoke tests for QR sync flows. No E2E tags are warranted for pure telemetry instrumentation changes. Performance Test Selection: |
|




Description
Implements sentry integration for QR account sync failures, so sync receive-path errors are queryable in Sentry without leaking secrets (OTP, SRP, addresses, raw QR / deeplink payloads).
This change:
app/core/QrSync/qrSyncTelemetry.tswithfeature:qr-synctags, phase breadcrumbs, sensitive-field scrubbing, andreportQrSyncFailure(viaLogger.error→ Sentry)GRANT_WAIT_TIMEOUT, and reports terminate / import / provisioning failures.Changelog
CHANGELOG entry: null
Related issues
Refs: https://consensyssoftware.atlassian.net/browse/TO-920
Manual testing steps
Screenshots/Recordings
Before
N/A - no UI change
After
N/A - no UI change
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
New OTP grant-timeout termination changes session behavior when handshake stalls, and error reporting now runs across vault import and provisioning paths—though secrets are scrubbed before Sentry.
Overview
Adds
qrSyncTelemetryso QR account sync receive-path failures are reported to Sentry withfeature:qr-synctags, surface/operation metadata, phase breadcrumbs, and scrubbed extras (no OTP, SRP, addresses, or raw QR/deeplink payloads).reportQrSyncFailurereplaces ad-hocLogger.errorcalls across Add Device scan submit, the QR scanner (invalid/expired classification),QrSyncController, import/navigation hooks, provisioning, and onboardingprovisionFromMetadata.QrSyncControllernow schedules an OTP grant-wait watchdog from the display deadline, fails with newGRANT_WAIT_TIMEOUT, clears the timer on connect/completion/teardown, and emits phase breadcrumbs on key transitions; session termination also reports via telemetry.Unit tests cover scrubbing, breadcrumbs,
reportQrSyncFailure, and the grant-timeout behavior.Reviewed by Cursor Bugbot for commit 83d5cd9. Configure here.