-
Notifications
You must be signed in to change notification settings - Fork 1
feat!: room integration p1 MonitorStorage #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
android/app/src/main/java/com/github/quarck/calnotify/monitorstorage/MonitorDatabase.kt
Show resolved
Hide resolved
Code Coverage Report
Files
|
📊 Code Coverage Summary
|
1 similar comment
📊 Code Coverage Summary
|
dd6ccbf to
5ea9eb0
Compare
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
android/app/src/main/java/com/github/quarck/calnotify/monitorstorage/MonitorDatabase.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/monitorstorage/MonitorStorage.kt
Show resolved
Hide resolved
android/app/src/main/java/com/github/quarck/calnotify/monitorstorage/RoomMonitorStorage.kt
Show resolved
Hide resolved
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
2 similar comments
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
| fun delete(entity: MonitorAlertEntity) | ||
|
|
||
| @Delete | ||
| fun deleteAll(entities: List<MonitorAlertEntity>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Batch operations lack transactional atomicity guarantees
The legacy implementation wraps batch operations (addAlerts, deleteAlerts, updateAlerts, deleteAlertsMatching) in explicit database transactions, providing all-or-nothing atomicity. The Room DAO methods insertAll, updateAll, and deleteAll lack @Transaction annotations, meaning each item is processed in a separate implicit transaction. If the app crashes mid-batch or an error occurs, some items may be committed while others aren't, causing data inconsistency. This differs from the legacy behavior which would rollback the entire batch on failure.
Additional Locations (1)
…vity UI tests These tests were taking 15-60+ seconds each due to: - Ultron polling for 15 seconds when views weren't immediately ready - Battery optimization dialog blocking view assertions - No synchronization with background data loading operations - 300ms+ dialog dismissal delay on every test Changes: - Add suppressBatteryDialog option to UITestFixture to prevent battery optimization dialog via SharedPreference - Enable waitForAsyncTasks=true for tests with background data loading, using IdlingResource for proper Espresso synchronization - Skip dialog dismissal entirely when dialogs are pre-suppressed - Reduce default Ultron timeout from 15s to 5s (IdlingResource handles async waits, timeout is just a safety net) Expected improvement: 15-60s per test → 2-5s per test
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
📊 Code Coverage Summary
|
wip
Note
Phase 1 Room adoption for monitor storage with robust migration and CI support.
MonitorAlertEntity,MonitorAlertDao,MonitorDatabase(withCrSqliteRoomFactory) andRoomMonitorStorage;MonitorStoragenow delegates to RoommanualAlertsV1with NOT NULL PKs and preservesmanualAlertsV1IdxV1; validated byMonitorStorageMigrationTest(open/read/write/update,room_master_tablepresent)CrSqliteRoomFactoryinto main app package; wire KSP task deps; add Room + androidx.sqlite dependencies in appXmlRunListenerto write to internal storage or a-e reportFilepath; adjust scripts (matrix_run_android_tests.sh,generate_android_coverage.sh) and workflow globs to pull per-shard XML and coverageUITestFixturecan grant permissions/suppress battery dialog; test classes updated accordinglyWritten by Cursor Bugbot for commit e7399d2. This will update automatically on new commits. Configure here.