Conversation
cancel(id) on an id with no row resolved and did nothing, so a v9 chunked upload that was still running at the upgrade, which gets no legacy row, kept its manifest and blob on disk for good. cancel(id) now deletes the id's directory when it has no entry file. A live entry and another id's directory are never touched. A same-id mutate() over a legacy row whose v9 manifest could not be read ignored the v9 blob, so it failed E_FILE_MISSING when the caller's source was already gone. It now runs over that blob on both platforms. A caller file that exists still wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dmurphy5
marked this pull request as ready for review
October 1, 2026 18:11
elliottkember
approved these changes
Oct 2, 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.
Description
Two fixes for apps that upgrade from v9 with a chunked upload still pending. Diana's v10 cutover resumes those uploads with a same-id
mutate()over the v9 manifest, so both paths matter at release.cancel(id)on an id with no row now deletes the id's directory when it has no entry file. A v9 chunked upload that was still running at the upgrade gets no legacy row, so before this its manifest and blob could never be released.mutate()over a legacy row whose v9 manifest could not be read now runs over the v9blob. Before, it ignored the blob and failed withE_FILE_MISSINGonce the caller's source was gone. A caller file that exists still takes priority. Fixed on Android and iOS.What to look at
QueueStore.removeUnownedon both platforms: what counts as unowned, and that it runs under the store lock on Android and on the coordinator's queue on iOS.QueueController.decideAndCommitand iOSQueueCoordinator+Enqueue.swift.Decisions and trade-offs
cancel()still resolves. Release is best effort, like the rest of the v9 cleanup.cancel("")does nothing, as before.Test plan
yarn lint:ci,yarn typecheck,yarn test(189 tests): pass.:react-native-background-upload:testDebugUnitTest, 313 tests): pass. New cases cover cancel of a row-less v9 folder, of an id with no folder, and a replace over a legacy row with a corrupt manifest.swift testinios/(210 tests): pass. New cases cover the iOS cancel and the unreadable-manifest replace. Each new case fails with its fix removed.🤖 Generated with Claude Code