Skip to content

[Bug]: one task export failure aborts remaining cloud sync and overwrites successful results #19459

Closed

Description

@aryanorastar

Problem

The backend's auto_sync_action_items_batch puts the entire cloud export loop inside one exception handler. A transient per-task failure therefore skips later tasks and overwrites earlier successful results with failures.

The conversation processor submits this worker once after saving extracted tasks. These tasks remain in Omi, but later ones are never attempted in the user's default external task service during that run.

Local reproduction

Reproduced against origin/main at 0e52d65c40280cd1795111dcf101fc3e7267440b with three synthetic tasks and the real batch worker / cloud task-creation helper. Database boundaries are fault-injected; provider HTTP is stubbed, not a production integration.

  1. Let task 0 export successfully.
  2. Raise a database read or export-marker write error for task 1.
  3. Observe that task 2 is never attempted and all three results say synced: false, including task 0's completed export.

Failures at the last item also incorrectly relabel earlier successful exports. An exception from the OAuth preflight in create_task_internal causes the same early abort.

Expected

Independent cloud exports should each receive one ordered outcome. A failure on one item must not erase earlier successful outcomes or prevent the remaining items from being attempted. Shared configuration failure should still prevent the whole batch, and cancellation must still propagate.

Scope

Backend only. No mobile/hardware changes, automatic retries, or exactly-once delivery claim. If the provider accepts a task but the export-marker write fails, the external side effect remains uncertain; this fix must not automatically repeat that request.

Overlap checked: #18735 sanitizes exception messages, whereas this defect is the batch's failure boundary. #19458/#19450 change Firestore write-batch sizing, not the external export loop. No matching active fix found in the shared tracker, branches, or GitHub.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions