[codex] Fix scratch storage promotion and add coverage gate#94
Merged
Conversation
Play rollout for PR #94 scratch storage promotion fix (Crashlytics 8fe3ece9). Co-authored-by: Cursor <cursoragent@cursor.com>
Photo Picker on Android 14 often ignores Download/; sweep-prep now also pushes and media-scans the canonical fixture under DCIM/Camera when SDK ≤ 34. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cacheDir/scratchtofilesDir/scratchso user-visible in-flight videos are not stored as cache-evictable data.cacheDir/scratch/reversed, and prune new active scratch, legacy cache scratch, and reverse cache paths.source_existskeys so future events distinguish missing files from real zero-byte files.:app:check.Root Cause
Crashlytics showed
promoteScratchToRaw()failing before render enqueue because KotlinFile.copyTo()could not find the scratch source file undercacheDir/scratch/raw_<uuid>.mp4. This is not the intentional post-render cleanup path: the worker only discards scratch and deletes the persisted raw after render succeeds. The source file was missing before WorkManager render enqueue.The artifact proves the active scratch was missing at promotion time. Cache eviction is the storage-design risk this PR removes by moving active user work out of
cacheDir; the fix also keeps explicit app deletion paths auditable.Validation
:app:testDebugUnitTestpassed.:app:jacocoDebugUnitTestReportpassed.:app:jacocoDebugViewModelCoverageVerificationpassed.:app:checkpassed.git diff --checkpassed.Coverage from the generated JaCoCo XML:
Known Gaps
emulator-5554 offline.