SDK-349 Serial execution and deletion semantics#1012
Merged
sumeruchat merged 2 commits intofeature/SDK-347-unpause-processing-requestsfrom Mar 16, 2026
Merged
Conversation
Invert error classification to whitelist-for-deletion: only 4xx client errors are permanent. 5xx server errors, network timeouts, DNS failures, and connection resets are now treated as transient and retain the task for retry. - Replace isNetworkUnavailable() with isPermanentFailure() in IterableAPICallTaskProcessor — checks for 4xx status codes only - Reorder error branches: JWT check first, then permanent failure, then default to transient retry - Update existing 500 test to expect retention instead of deletion - Add 3 processor-level unit tests (5xx, 4xx, timeout classification) - Add 2 integration tests (5xx recovery, 4xx deletion) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/SDK-347-unpause-processing-requests #1012 +/- ##
============================================================================
Coverage 70.20% 70.20%
============================================================================
Files 112 112
Lines 9213 9217 +4
============================================================================
+ Hits 6468 6471 +3
- Misses 2745 2746 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
I've updated the base branch to be the |
joaodordio
approved these changes
Mar 13, 2026
Member
joaodordio
left a comment
There was a problem hiding this comment.
Just left a comment regarding the 429 code
Exclude 429 from isPermanentFailure() so rate-limited requests are retained for retry instead of being deleted. Add unit test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
445adb0
into
feature/SDK-347-unpause-processing-requests
9 checks passed
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
IterableAPICallTaskProcessor: replace narrowisNetworkUnavailable()(string match for "offline") withisPermanentFailure()(whitelist 4xx as permanent). Everything else — 5xx, timeouts, DNS failures, connection resets — is now treated as transient and retains the task for retry.runningflag, recursiveprocessTasks(), single CoreData context) — no changes neededWhat changed
Test plan
testRetainTaskOn5xxWithAutoRetry— 500 retains task (updated from old test that expected deletion)testRetainTaskOn5xxAndProcessAfterRecovery— 500 retains, fix server → task succeedstestDeleteTaskOn4xxClientError— 400 deletes task immediatelytest5xxErrorIsTransient— processor-level: 500 →.failureWithRetrytest4xxErrorIsPermanent— processor-level: 400 →.failureWithNoRetrytestTimeoutErrorIsTransient— processor-level: timeout →.failureWithRetry🤖 Generated with Claude Code