Skip to content

🐛 Fix duplicate retry condition and check() crash in sync task executors#3766

Merged
guiyanakuang merged 1 commit intomainfrom
fix/session13-sync-task-robustness
Feb 8, 2026
Merged

🐛 Fix duplicate retry condition and check() crash in sync task executors#3766
guiyanakuang merged 1 commit intomainfrom
fix/session13-sync-task-robustness

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

Closes #3765

Summary

Code review Session 13 fixes for sync task executors:

  • M1: Fix duplicate SYNC_NOT_ALLOW_RECEIVE_BY_APP in noNeedRetry check — the second condition was a copy-paste bug and should be SYNC_NOT_ALLOW_SEND_BY_APP. Previously, sync tasks that failed due to send-permission errors would be incorrectly retried up to 3 times.
  • M3: Replace check(fileItems.isNotEmpty() && fileItems.size == 1) in PullFileTaskExecutor with a proper doFailure() result. The check() threw an opaque IllegalStateException ("Check failed") that was caught by TaskExecutor as a non-retryable failure with no useful error message.

Test plan

  • Verify paste sync still works between devices
  • Verify file pull tasks handle edge cases gracefully
  • Pre-existing test failure (HostInfoFilterTest.testInvalidSelfIPAddress) is unrelated

🤖 Generated with Claude Code

- Fix duplicate SYNC_NOT_ALLOW_RECEIVE_BY_APP in noNeedRetry check,
  replace with SYNC_NOT_ALLOW_SEND_BY_APP so send-permission failures
  are correctly treated as non-retryable
- Replace check() assertion in PullFileTaskExecutor with proper failure
  result to avoid opaque IllegalStateException on unexpected PasteFiles count

Closes #3765

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@guiyanakuang guiyanakuang merged commit 6b9be1c into main Feb 8, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the fix/session13-sync-task-robustness branch February 8, 2026 03:04
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.

🐛 Fix duplicate retry condition and check() crash in sync task executors

1 participant