Skip to content

fix(android): reject self-provider picker roots - #446

Open
veryCrunchy wants to merge 74 commits into
fix/durable-upload-scheduling-recovery-stackfrom
fix/picker-provider-feedback
Open

fix(android): reject self-provider picker roots#446
veryCrunchy wants to merge 74 commits into
fix/durable-upload-scheduling-recovery-stackfrom
fix/picker-provider-feedback

Conversation

@veryCrunchy

@veryCrunchy veryCrunchy commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

  • Reject the app’s own DocumentsProvider authority from upload and folder-sync pickers.
  • Handle document, tree, percent-encoded, mixed-case, and Android user-prefixed authority forms.
  • Reject restored self-provider roots before any WebDAV cleanup, construction, or remote scan.
  • Reconcile legacy owned downloads through a journal-scoped cleanup path so pair and account removal can still complete.

Validation

  • Full repository checks passed.
  • Build host: eight focused Android picker, provider, capability, file-sync, and recovery test classes passed.
  • Build host: :androidApp:assembleDebug passed.
  • Exact validated code tree: 96c4e76e3efafc7198ed2b2948411ce1c08dfda5.

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 15:22 Destroyed
@obiente-cloud

obiente-cloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

Obiente preview

NC Native · 62a3f5b86855 · Ready

Open preview

View in Obiente

Obiente updates this comment as the preview changes.

@veryCrunchy
veryCrunchy marked this pull request as ready for review September 5, 2026 15:23
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 15:23 Destroyed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 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-06T07:24:32.224313Z 62a3f5b 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.

@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: 538e12112f

ℹ️ 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".

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 16:01 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: 72c0b6edf5

ℹ️ 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 7dfaeb8 to d963ee4 Compare September 5, 2026 22:42
@veryCrunchy
veryCrunchy force-pushed the fix/picker-provider-feedback branch from 72c0b6e to 548a50d Compare September 5, 2026 22:44
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 22:44 Destroyed
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch from d963ee4 to b2c2188 Compare September 5, 2026 23:01
@veryCrunchy
veryCrunchy force-pushed the fix/picker-provider-feedback branch from 548a50d to 8bacb4d Compare September 5, 2026 23:02
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 23:02 Destroyed
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 23:22 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: 5e91eb6921

ℹ️ 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".

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 5, 2026 23: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: 5bcc25f9d0

ℹ️ 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 3 times, most recently from 6057f39 to a712498 Compare September 6, 2026 04:47
@veryCrunchy
veryCrunchy force-pushed the fix/picker-provider-feedback branch from 5bcc25f to d50a4e9 Compare September 6, 2026 04:48
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 6, 2026 04:48 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: d50a4e9048

ℹ️ 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".

Comment thread androidApp/src/main/kotlin/dev/obiente/nextcloudnative/AndroidFileSyncEngine.kt Outdated
Comment thread androidApp/src/main/kotlin/dev/obiente/nextcloudnative/AndroidAccountRemoval.kt Outdated
@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch 3 times, most recently from cc5f869 to 337b65f Compare September 6, 2026 05:49
@veryCrunchy
veryCrunchy force-pushed the fix/picker-provider-feedback branch from d50a4e9 to 156ee6f Compare September 6, 2026 05:50
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #446 / NC Native September 6, 2026 05:50 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: 156ee6febf

ℹ️ 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 54c77f1 to 30d6eb1 Compare September 6, 2026 07:14

@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: 62a3f5b868

ℹ️ 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".

).map { candidate ->
candidate to DocumentsContract.buildDocumentUriUsingTree(treeUri, candidate.documentId)
}
val hasRelevantPendingRecovery = indexedOwnership::hasPendingTransactions

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Limit legacy recovery completion to the selected tree

When an upgraded installation has a pending ownership row for a different SAF tree or account in the legacy shared directory, indexedOwnership includes that row and this predicate remains true even after every candidate under the current self-provider root has been reconciled. Since recorded candidates and discovery are correctly limited to the current root, they can never remove the unrelated row, so pair and account removal remain blocked until an unrelated sync happens to recover. Restrict completion to rows attributable to this tree while retaining genuinely unclassified rows fail-closed.

AGENTS.md reference: AGENTS.md:L410-L411

Useful? React with 👍 / 👎.

@veryCrunchy
veryCrunchy force-pushed the fix/durable-upload-scheduling-recovery-stack branch 6 times, most recently from bcae385 to 1caca52 Compare September 6, 2026 12:32
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