[OPTIMIZATION] Native Communication Module - Timeouts & Retry - src/lib/native/communication.ts #61

Closed
opened 2026-06-06 20:46:02 +00:00 by Mark · 0 comments
Owner

Critical Issues (1)

  1. Native calls without timeouts - CallLog.getCallLog(), Sms.getSms(), Email.getEmails() can hang indefinitely
    • Fix: Wrap each with Promise.race + 5s timeout

High Issues (1)

  1. Empty catch blocks swallow errors - no retry on transient failures
    • Fix: 3-attempt exponential backoff before giving up

Medium Issues (1)

  1. Bare catch { return false } masks programming bugs as "permission denied"
    • Fix: Only catch expected errors (e.g., DOMException with SecurityError)
## Critical Issues (1) 1. **Native calls without timeouts** - `CallLog.getCallLog()`, `Sms.getSms()`, `Email.getEmails()` can hang indefinitely - Fix: Wrap each with `Promise.race` + 5s timeout ## High Issues (1) 2. **Empty catch blocks swallow errors** - no retry on transient failures - Fix: 3-attempt exponential backoff before giving up ## Medium Issues (1) 3. **Bare `catch { return false }`** masks programming bugs as "permission denied" - Fix: Only catch expected errors (e.g., `DOMException` with `SecurityError`)
Mark 2026-06-14 06:52:59 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#61
No description provided.