Skip to content

fix(support): finish interrupted report cancellation - #386

Merged
veryCrunchy merged 14 commits into
mainfrom
fix/support-cancellation-recovery
Aug 15, 2026
Merged

fix(support): finish interrupted report cancellation#386
veryCrunchy merged 14 commits into
mainfrom
fix/support-cancellation-recovery

Conversation

@veryCrunchy

@veryCrunchy veryCrunchy commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • cancel an attempted private support upload through an authoritative idempotency-key operation instead of treating repeated receipt 404s as terminal
  • serialize cancellation with upload-marker, retry, and response disposition through the shared state lock and a one-shot operation continuation
  • atomically snapshot, strip, persist, and if needed roll back cancellation payload under one persistence lock, then cancel only the transport call captured with that intent
  • normalize crash-interrupted cancellation descriptors during restoration, reconcile cancellation before wall-clock expiry, accept restored server 410, and remove the client polling deadline

Root cause

The original cancellation path had no authoritative server operation when an upload might still be buffered but had not created a receipt. A receipt 404 proved only that no report was committed at that instant. Neither a client deadline nor the device wall clock could prove that the POST would not arrive later, so discarding the local idempotency key could strand a private report without a deletion capability.

The companion server contract in Obiente/support#3 atomically tombstones the hashed idempotency key, deletes any report already created with it, and rejects delayed submissions. This client records at the final transport boundary that the key requires a server tombstone and independently tracks whether Retry should reconcile or re-upload. If Cancel intersects response processing after the active call has cleared, endOperation() consumes its persisted one-shot continuation before becoming idle. The first durable cancellation write contains only minimal recovery state, and concurrent cancellation paths cannot repopulate stripped private data because minimization and rollback share the persistence lock. Restored cancellation is minimized and bypasses local expiry; a lost terminal response is recovered through the server's 410 submission_cancelled result.

Requires Obiente/support#3.

Follow-up to #359.

Advances #351.

Validation

  • ./gradlew :ui:desktopTest --tests dev.obiente.nextcloudnative.app.JvmSupportIntakeTest - all 88 support-intake tests passed
  • ANDROID_HOME=/opt/android-sdk ANDROID_SDK_ROOT=/opt/android-sdk ./gradlew :androidApp:assembleDebug
  • node tools/changelog-fragments.mjs validate - validated 102 fragments
  • node tools/changelog-fragments.mjs check-diff --base main --head HEAD
  • git diff --check

Validated on the dedicated build host.

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 00:34 Destroyed
@obiente-cloud

obiente-cloud Bot commented Aug 15, 2026

Copy link
Copy Markdown

Obiente preview

NC Native · 58b332000148 · Removed

View preview status

View in Obiente

Obiente updates this comment as the preview changes.

@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 00:35 Destroyed
@veryCrunchy veryCrunchy added this to the 0.6 Platform polish milestone Aug 15, 2026
@veryCrunchy veryCrunchy added priority:P1 Required for the pre-release product experience area:platform Android, desktop, iOS, Windows, macOS, and Linux platform work area:ux Navigation, accessibility, responsive design, and interaction type:reliability Correctness, crash prevention, recovery, and data safety platform:android Android-specific implementation or validation platform:desktop Desktop-specific implementation or validation labels Aug 15, 2026
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 00:40 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: 582db3814f

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
Comment thread ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 01:03 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: bc016fc047

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 01:16 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: b3ba194bf2

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 01:28 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: c83c74f858

ℹ️ 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 #386 / NC Native August 15, 2026 01:40 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: 8e282f6adb

ℹ️ 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 #386 / NC Native August 15, 2026 02:27 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: d7f5afd847

ℹ️ 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 #386 / NC Native August 15, 2026 02: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: 09cf4e7772

ℹ️ 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 #386 / NC Native August 15, 2026 02:58 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: a174511529

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 03:28 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: 2b9d495fd3

ℹ️ 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/support-cancellation-recovery branch from 2b9d495 to 8f5cd2d Compare August 15, 2026 03:39
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 03: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: 8f5cd2d1e4

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@veryCrunchy
veryCrunchy force-pushed the fix/support-cancellation-recovery branch from 8f5cd2d to 59f196f Compare August 15, 2026 03:52
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 03: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: 59f196fa74

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@veryCrunchy
veryCrunchy force-pushed the fix/support-cancellation-recovery branch from 59f196f to 4185590 Compare August 15, 2026 04:08
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 04:08 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: 41855903b1

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
Comment thread ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@veryCrunchy
veryCrunchy force-pushed the fix/support-cancellation-recovery branch from 4185590 to d7aa358 Compare August 15, 2026 04:24
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 04:24 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: d7aa35876b

ℹ️ 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/support-cancellation-recovery branch from d7aa358 to a07999e Compare August 15, 2026 04:38
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 04:38 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: a07999e4c7

ℹ️ 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 ui/src/jvmMain/kotlin/dev/obiente/nextcloudnative/app/JvmSupportIntake.kt Outdated
@veryCrunchy
veryCrunchy force-pushed the fix/support-cancellation-recovery branch from a07999e to 58b3320 Compare August 15, 2026 04:46
@obiente-cloud
obiente-cloud Bot temporarily deployed to Obiente Preview / PR #386 / NC Native August 15, 2026 04:46 Destroyed
@veryCrunchy
veryCrunchy merged commit 4db2797 into main Aug 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Android, desktop, iOS, Windows, macOS, and Linux platform work area:ux Navigation, accessibility, responsive design, and interaction platform:android Android-specific implementation or validation platform:desktop Desktop-specific implementation or validation priority:P1 Required for the pre-release product experience type:reliability Correctness, crash prevention, recovery, and data safety

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant