Skip to content

[Do Not Merge] - CI Trigger for #297#298

Merged
ParaskP7 merged 2 commits intotrunkfrom
fix/corrupted-assignments-cache
Apr 3, 2026
Merged

[Do Not Merge] - CI Trigger for #297#298
ParaskP7 merged 2 commits intotrunkfrom
fix/corrupted-assignments-cache

Conversation

@ParaskP7
Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 commented Apr 2, 2026

Do not merge this draft PR, it only usage is to trigger the CI checks associated to its external contributor (ish) related PR (#297).

akirk added 2 commits April 1, 2026 00:02
An interrupted write to assignments.json (e.g. app killed mid-write) leaves
an empty or truncated file. On next launch, Moshi throws EOFException parsing
it, which propagates out of the FileBasedCache init coroutine and crashes the
app in a loop that Clear Cache cannot fix (file lives in filesDir, not cacheDir).

- Treat empty files as a cache miss and delete them
- Catch JSON parse failures, log and delete the corrupted file
- Wrap the init block's coroutine in runCatching so any future read failure
  degrades gracefully instead of crashing the process
Preserves stack traces in logs when cache reads fail.
@ParaskP7 ParaskP7 merged commit 3893a8a into trunk Apr 3, 2026
12 checks passed
@ParaskP7 ParaskP7 deleted the fix/corrupted-assignments-cache branch April 3, 2026 06:08
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.

2 participants