fix(ingestion): do not delete ingest files when chunk processing fails - #57
Merged
jamiepine merged 1 commit intoFeb 19, 2026
Conversation
When any chunk fails (e.g. provider 401/429), keep the source file and chunk progress rows so the next poll cycle can resume cleanly. Previously the file was unconditionally deleted even on failure, causing data loss. Adds two unit tests covering the failure and success flag paths. Fixes spacedriveapp#48
sookochoff
force-pushed
the
fix/ingest-do-not-delete-on-failure
branch
from
February 19, 2026 15:38
666e6d5 to
561681c
Compare
rktmeister
pushed a commit
to rktmeister/spacebot
that referenced
this pull request
Mar 11, 2026
…-delete-on-failure fix(ingestion): do not delete ingest files when chunk processing fails
This was referenced Jul 29, 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.
Summary
Fixes a data-loss bug in ingestion where source files were deleted even when one or more chunks failed to process.
Root cause
tracked chunk failures via , and marked as , but still unconditionally:
That made retries impossible and could lose user data when providers/API calls failed mid-ingestion.
Changes
Why this is safe
This preserves the intended resumable-ingestion behavior (already-completed chunks are skipped on restart/poll) and prevents data loss on transient provider failures.
Fixes #48