Skip to content

Conversation

@williscool
Copy link
Owner

@williscool williscool commented Dec 29, 2025

wip


Note

Phase 1 Room adoption for monitor storage with robust migration and CI support.

  • Implement Room for monitor storage: adds MonitorAlertEntity, MonitorAlertDao, MonitorDatabase (with CrSqliteRoomFactory) and RoomMonitorStorage; MonitorStorage now delegates to Room
  • Pre-Room legacy migration: recreates manualAlertsV1 with NOT NULL PKs and preserves manualAlertsV1IdxV1; validated by MonitorStorageMigrationTest (open/read/write/update, room_master_table present)
  • Move CrSqliteRoomFactory into main app package; wire KSP task deps; add Room + androidx.sqlite dependencies in app
  • CI/test reliability: update XmlRunListener to write to internal storage or a -e reportFile path; adjust scripts (matrix_run_android_tests.sh, generate_android_coverage.sh) and workflow globs to pull per-shard XML and coverage
  • Faster, stable UI tests: base Ultron timeout reduced to 5s; UITestFixture can grant permissions/suppress battery dialog; test classes updated accordingly
  • Docs: update database modernization plan/status and WSL guide with Windows-based instrumentation test instructions

Written by Cursor Bugbot for commit e7399d2. This will update automatically on new commits. Configure here.

@github-actions
Copy link

Build artifacts for PR #137 (commit de94205) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Code Coverage Report

Overall Project 33.16% -1.07% 🍏
Files changed 18.81%

Module Coverage
app 42.91% -0.83%
x8664Debug 23.52% -1.31%
Files
Module File Coverage
app MonitorStorage.kt 100% 🍏
MonitorAlertEntity.kt 87.72% -12.28% 🍏
CrSqliteRoomFactory.kt 87.13% 🍏
MonitorDatabase.kt 28.5% -71.5%
MonitorStorageImplV1.kt 8.43% 🍏
RoomMonitorStorage.kt 0% -89.74%
x8664Debug MonitorStorage.kt 0% -81.25%
MonitorStorageImplV1.kt 0% 🍏
MonitorAlertEntity.kt 0% -98.68%
MonitorDatabase.kt 0% -97.1%
RoomMonitorStorage.kt 0% -89.74%
CrSqliteRoomFactory.kt 0% 🍏

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 42.92
Changed Files 56.57

View detailed coverage report

1 similar comment
@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 42.92
Changed Files 56.57

View detailed coverage report

@williscool williscool force-pushed the feat/room_migration_p1 branch from dd6ccbf to 5ea9eb0 Compare December 30, 2025 02:56
@williscool williscool changed the base branch from feat/room_integration to master December 30, 2025 02:56
@github-actions
Copy link

Build artifacts for PR #137 (commit 4809507) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.86
Changed Files 100

View detailed coverage report

@williscool williscool changed the title refactor: room integration p1 MonitorStorage feat!: room integration p1 MonitorStorage Dec 30, 2025
@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.86
Changed Files 100

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #137 (commit a67b6d7) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.55
Changed Files 100

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #137 (commit 63f18b1) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.55
Changed Files 100

View detailed coverage report

2 similar comments
@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.55
Changed Files 100

View detailed coverage report

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.55
Changed Files 100

View detailed coverage report

fun delete(entity: MonitorAlertEntity)

@Delete
fun deleteAll(entities: List<MonitorAlertEntity>)
Copy link

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)

Fix in Cursor Fix in Web

…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
@github-actions
Copy link

Build artifacts for PR #137 (commit 097cb26) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 31.78
Changed Files 2.47

View detailed coverage report

@github-actions
Copy link

Build artifacts for PR #137 (commit cfb0deb) are available:

You can download these artifacts from the "Artifacts" section of the workflow run.

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 23.52
Changed Files 100

View detailed coverage report

@github-actions
Copy link

📊 Code Coverage Summary

Coverage Type Coverage
Overall 33.16
Changed Files 13.01

View detailed coverage report

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