Skip to content

fix(android): preserve queued upload scheduling - #439

Open
veryCrunchy wants to merge 8 commits into
fix/account-background-isolationfrom
fix/durable-upload-scheduling-recovery-stack
Open

fix(android): preserve queued upload scheduling#439
veryCrunchy wants to merge 8 commits into
fix/account-background-isolationfrom
fix/durable-upload-scheduling-recovery-stack

Conversation

@veryCrunchy

Copy link
Copy Markdown
Member

Outcome

  • keep the durable Deck attachment journal after WorkManager scheduling completes ambiguously
  • preserve the queued source capability so status restoration can schedule the same job again after process restart
  • propagate cancellation after persistence without converting it into a rejected upload
  • release a newly selected source only when the queue can prove that no active job owns it

Failure path

The upload job was persisted before WorkManager scheduling, but any exception from awaiting the scheduling operation deleted that journal and released its source. WorkManager can already have accepted or started the work before its completion signal fails, leaving a server-visible upload without a durable outcome record and allowing the same attachment to be submitted again.

Validation

On the dedicated Linux build host, from exact parent 8d1989297bb99efd8e5bb40bc7e1761c98299ad2:

  • :androidApp:testDebugUnitTest --tests dev.obiente.nextcloudnative.AndroidDurableMultipartUploadPolicyTest
  • :androidApp:assembleDebug
  • bash tools/check-kotlin-architecture.sh
  • bash tools/check-repository.sh

The deterministic tests cover scheduler acceptance followed by a lost completion signal, restart-visible queued state, cancellation after persistence, and persistence failure before scheduling.

Evidence boundaries

This validates the transaction policy and Android debug build on Linux. It does not include an emulator lifecycle run, a live Nextcloud attachment upload, or an injected failure inside Android's real WorkManager database.

This PR is intentionally based on #438 because that ready account-isolation change owns the adjacent queued-account credential lookup.

Advances #52

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 1, 2026 21:15 Destroyed
@obiente-cloud

obiente-cloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

Obiente preview

NC Native · 7d2b5495e4a2 · Queued

View preview status

View in Obiente

Obiente updates this comment as the preview changes.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T07:24:19.113502Z 7d2b549 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 1, 2026 21:17 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 454d73b427

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from e2a8728 to d4e541c Compare September 1, 2026 21:54
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 1, 2026 21:54 Destroyed
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 1, 2026 22:31 Destroyed
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 4482b93 to c2f0cc7 Compare September 3, 2026 20:43
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 3, 2026 20:43 Destroyed
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from c2f0cc7 to 84677b8 Compare September 3, 2026 20:54
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 3, 2026 20:54 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84677b8a69

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 84677b8 to abcbb66 Compare September 3, 2026 21:18
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 3, 2026 21:19 Destroyed
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from abcbb66 to 7b2e575 Compare September 3, 2026 21:43
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 3, 2026 21:43 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b2e575cd6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 7b2e575 to a86e5ec Compare September 4, 2026 00:39
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 00:39 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a86e5ec1fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from a86e5ec to 3ed84f8 Compare September 4, 2026 01:10
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 01:10 Destroyed
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 02:26 Destroyed
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from e9b258f to 3e4c2a7 Compare September 4, 2026 02:56
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 02:56 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e4c2a749c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 3e4c2a7 to 92cc1b7 Compare September 4, 2026 03:20
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 03:20 Destroyed
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 92cc1b7 to 4b55254 Compare September 4, 2026 04:02
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 04:02 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b552541b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 4b55254 to 8a2b6c4 Compare September 4, 2026 05:52
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 05:52 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a2b6c4409

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from 8a2b6c4 to 05d2af4 Compare September 4, 2026 06:23
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #439 / NC Native September 4, 2026 06:23 Destroyed
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