Repository navigation
fix(native): Cache failed daemon uploads for retry - #2199
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2199 +/- ##
==========================================
+ Coverage 75.42% 75.63% +0.20%
==========================================
Files 103 103
Lines 28254 28244 -10
Branches 5177 5173 -4
==========================================
+ Hits 21310 21361 +51
+ Misses 5600 5541 -59
+ Partials 1344 1342 -2 🚀 New features to boost your workflow:
|
jpnurmi
force-pushed
the
jpnurmi/fix/native-retry
branch
from
October 14, 2026 13:22
0142378 to
3487560
Compare
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, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3487560. Configure here.
`http_transport_shutdown` sealed the retry queue as soon as the worker missed its timeout, before `sentry_close` dumped the still-queued send tasks to disk. A send that failed in between had its enqueue refused and fell through to the discard branch, so if the worker popped its task before the dump took the queue lock, the envelope was lost. Seal from `http_dump_queue` instead. Every caller of the dump is terminal, and the dump has written the in-flight envelope by then, so a refused enqueue can no longer drop anything. The seal keeps preventing a detached worker from caching an envelope the dump already wrote.
The daemon starts without a retry queue, so failed uploads previously used non-retry cache filenames and were never sent on restart. Track `retry_enabled` independently of the retry instance. Persist full envelopes with retry filenames for the SDK to send on its next start, without enabling retries in the daemon. The daemon no longer pre-writes crash envelopes with attachment refs or sweeps the run directory after a clean shutdown. It relies on the transport's queue dump at exit instead, and clears `retry_enabled` right after that dump so an upload that was still stuck in the worker is not cached a second time when it eventually fails. Fixes: #2193
jpnurmi
force-pushed
the
jpnurmi/fix/native-retry
branch
from
October 15, 2026 08:35
3487560 to
f7cb8e2
Compare
mujacica
approved these changes
Oct 15, 2026
JoshuaMoelans
approved these changes
Oct 16, 2026
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.

The daemon starts without a retry queue, so failed uploads previously used non-retry cache filenames and were not sent on restart as appropriate.
Track
retry_enabledindependently of the retry instance. Persist full envelopes with retry filenames for the SDK to send on its next start, without enabling retries in the daemon.Fixes: #2193