Parent
Architecture review (2026-06-21). Slice 6 of 6 from the deepening series. Speculative — the Android Kotlin work has not yet started, so this is preventive architecture. Documented at android/rust/usbip-android/src/lib.rs:26.
What to build
Before any Kotlin UI/state code is written, copy the base-class discipline from Dish-Android wholesale:
AbstractStateSource<S> — single owner of a StateFlow<S>, with val state: StateFlow<S> and an abstract protected fun compute(): S
AbstractComposer<S, A> — translates a state into a Composable function; no business logic
AbstractController<S, A> — accepts user actions, mutates the StateSource, never directly mutates state
Write an ADR (docs/adr/0007-android-base-classes.md) capturing the decision with a code skeleton inline. The base classes themselves live in android/core/src/main/java/com/anyplug/base/ and ship as a real, instantiable package even before the first concrete subclass lands.
This is cheap now (3 small files) and expensive to add later (every existing state-source would need to be retrofitted).
Acceptance criteria
Blocked by
Parent
Architecture review (2026-06-21). Slice 6 of 6 from the deepening series. Speculative — the Android Kotlin work has not yet started, so this is preventive architecture. Documented at
android/rust/usbip-android/src/lib.rs:26.What to build
Before any Kotlin UI/state code is written, copy the base-class discipline from Dish-Android wholesale:
AbstractStateSource<S>— single owner of aStateFlow<S>, withval state: StateFlow<S>and an abstractprotected fun compute(): SAbstractComposer<S, A>— translates a state into a Composable function; no business logicAbstractController<S, A>— accepts user actions, mutates the StateSource, never directly mutates stateWrite an ADR (
docs/adr/0007-android-base-classes.md) capturing the decision with a code skeleton inline. The base classes themselves live inandroid/core/src/main/java/com/anyplug/base/and ship as a real, instantiable package even before the first concrete subclass lands.This is cheap now (3 small files) and expensive to add later (every existing state-source would need to be retrofitted).
Acceptance criteria
android/core/src/main/java/com/anyplug/base/AbstractStateSource.ktexists with KDoc explaining the discipline and a single abstract methodandroid/core/src/main/java/com/anyplug/base/AbstractComposer.ktexistsandroid/core/src/main/java/com/anyplug/base/AbstractController.ktexistsdocs/adr/0007-android-base-classes.md) explains the decision, references the Dish-Android original, and shows a code skeletonandroid/core/src/test/java/com/anyplug/base/proves the StateFlow round-trips a compute() result correctlyBlocked by