Room database for cycle history, with entities, DAOs and a migration test #3
Labels
No Label
P0
P1
P2
release-blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Privacy-Period-Tracker#3
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nothing is persisted.
domain/cycledefinesPeriodRecordandSpottingRecordas plain Kotlin and nothing writes them anywhere, so every forecast the app can currently produce dies with the process.What to build, in
core/database(an Android library module that does not exist yet):PeriodRecord,SpottingRecord,PredictionRecord,NotYetObservationFlowrather than one-shot readsRules that are not negotiable here:
SpottingRecordmust never be able to start or reset a cycle (§25)PredictionRecordis a snapshot taken before the outcome is known and is never overwritten in place — it is the only thing that makes accuracy measurable (§16)PeriodRecordthe user did not confirm. §14: never secretly modify health historyWhen this lands, add its row to the migration table in
docs/architecture/README.mdin the same commit. That document's Review trigger names a new Room migration specifically, because a migration table that lags is the failure the template records at length.Verify:
./gradlew :core:database:testpasses including the version-1 migration test,core/database/schemas/*.jsonis committed, and inserting a period record survives a force-stop and relaunch on a device.