⚙️ Technical Change
Title
Unify Error Handling with a Result-Based Resilience Layer Across KMP Shared Module
Type
technical-change
Problem
Wakeve has no unified error-handling strategy — repository calls, state machine transitions, and sync operations each handle failures ad-hoc, risking unhandled exceptions crashing the app during store review (e.g., offline sync conflicts, malformed API responses, permission denials).
Solution
Introduce a sealed AppResult<T> type in commonMain with explicit Success, RecoverableError (retryable with backoff), and FatalError (show + log) variants. Wire it through Repository → StateMachine → UI layers, replacing bare try/catch blocks. Add a lightweight RetryPolicy for sync and API calls.
Why Now
The branch is release/1.0.0-store-submission — unhandled exceptions are the #1 cause of store rejection; a single resilience layer now prevents scattered fixes later and hardens the FC&IS boundary.
Context
Suggested by Solution Architect during round table
Proposal #3 · Created: 2026-04-15T20:29:39.199Z · By: architect
⚙️ Technical Change
Title
Unify Error Handling with a Result-Based Resilience Layer Across KMP Shared Module
Type
technical-change
Problem
Wakeve has no unified error-handling strategy — repository calls, state machine transitions, and sync operations each handle failures ad-hoc, risking unhandled exceptions crashing the app during store review (e.g., offline sync conflicts, malformed API responses, permission denials).
Solution
Introduce a sealed
AppResult<T>type incommonMainwith explicitSuccess,RecoverableError(retryable with backoff), andFatalError(show + log) variants. Wire it through Repository → StateMachine → UI layers, replacing baretry/catchblocks. Add a lightweightRetryPolicyfor sync and API calls.Why Now
The branch is
release/1.0.0-store-submission— unhandled exceptions are the #1 cause of store rejection; a single resilience layer now prevents scattered fixes later and hardens the FC&IS boundary.Context
Suggested by Solution Architect during round table
Proposal #3 · Created: 2026-04-15T20:29:39.199Z · By: architect