CycleData.repository defaults to the retired baseline engine #49
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#49
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?
What is true now.
CycleData.repository(context, engine = BaselinePredictionEngine(), clock = ...)carries a default forengine. No production or test caller relies on it —DataModule.kt:48and all five test call sites pass an engine explicitly — so nothing is broken today.What it costs. Nothing yet, and silently everything later: a future caller who omits the argument compiles cleanly and ships
BaselinePredictionEngine, the prototype PRODUCT_PLAN §11 names as an unacceptable final engine, retired in Batch 02. Which engine ships is one decision made in one line (DataModule.predictionEngine()); a default here is a second, silent place to take it.What to do. Make the parameter required and drop the now-unused import. Keep
clock's default — the system clock is not a product choice, and §50's timezone tests need to override it.Traps.
BaselinePredictionEngineitself stays in the tree: it is the frozen controlEngineComparisonTestmeasures the real engine against, and its ownDEFAULT_CYCLE_DAYS = 28.0must not be changed when the personal engine's population default moves.Verify:
grep -rn "CycleData.repository(" --include="*.kt"shows every call site passing an engine, and./gradlew :core:data:compileDebugKotlin :app:compileDebugKotlinsucceeds — the compiler is the test.