Skip to content

fix(upload): schedule recovery for pending automatic uploads - #18050

Open
xO-ox-ai wants to merge 1 commit into
nextcloud:masterfrom
xO-ox-ai:codex/recover-auto-upload-handoff
Open

xO-ox-ai wants to merge 1 commit into
nextcloud:masterfrom
xO-ox-ai:codex/recover-auto-upload-handoff

Conversation

@xO-ox-ai

Copy link
Copy Markdown

When retrying a failed automatic upload, FileUploadWorker deleted its upload record and assumed AutoUploadWorker would take over without scheduling it. This could leave the upload pending after connectivity recovered.

Schedule the matching enabled automatic upload folder explicitly and preserve the existing upload record, ID and E2EE recovery token. Only hand over a pending file when its account, folder and remote destination match, and respect the global upload pause. Existing unique-work, network, charging and retry constraints remain in use.

Validation on this branch:

  • 11 focused JVM tests passed, covering recovery scheduling, upload ID/token preservation, pause, conflicts, cancellation, account/folder/destination matching, connectivity recovery and WorkManager constraints.
  • Kotlin formatting and Detekt for the changed files passed.
  • lintGplayDebug passed with no errors or warnings.
  • SpotBugs analysis of the changed production classes completed with no analysis errors or missing classes; comparison with the base version found no new report identities.

AI disclosure: Codex (GPT-6) assisted with implementation, tests and analysis.

Preserve failed upload records and E2EE recovery tokens when handing pending files back to the matching automatic upload folder.

Assisted-by: Codex:GPT-6
Signed-off-by: Li Wei <caeser222000@sohu.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant