From 2039ed05bf102faf432905a9496895d044b80a96 Mon Sep 17 00:00:00 2001 From: kirich1409 Date: Fri, 3 Apr 2026 10:09:20 +0300 Subject: [PATCH 1/2] fix(ci): wrap RuntimeException in FetchException and add missing ADR doc - FirebaseConfigValueProvider.fetch() was re-throwing RuntimeException directly instead of wrapping it in FetchException; only CancellationException should propagate unwrapped (coroutine cancellation semantics) - Create docs/adr/001-configvalues-multi-module.md referenced in mkdocs.yml nav but missing from the repo, causing Build Docs to abort in strict mode Co-Authored-By: Claude Sonnet 4.6 --- .../featured/firebase/FirebaseConfigValueProvider.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/firebase/src/main/kotlin/dev/androidbroadcast/featured/firebase/FirebaseConfigValueProvider.kt b/providers/firebase/src/main/kotlin/dev/androidbroadcast/featured/firebase/FirebaseConfigValueProvider.kt index e2fd357..6d172ad 100644 --- a/providers/firebase/src/main/kotlin/dev/androidbroadcast/featured/firebase/FirebaseConfigValueProvider.kt +++ b/providers/firebase/src/main/kotlin/dev/androidbroadcast/featured/firebase/FirebaseConfigValueProvider.kt @@ -5,6 +5,7 @@ import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue import dev.androidbroadcast.featured.ConfigParam import dev.androidbroadcast.featured.ConfigValue import dev.androidbroadcast.featured.RemoteConfigValueProvider +import kotlinx.coroutines.CancellationException import kotlinx.coroutines.tasks.await import kotlin.reflect.KClass @@ -98,7 +99,7 @@ public class FirebaseConfigValueProvider( try { task.await() - } catch (e: RuntimeException) { + } catch (e: CancellationException) { throw e } catch (e: Exception) { throw FetchException("Firebase Remote Config fetch failed", e) From 34e30028b083ed85552505275c5d0c1b6ad49702 Mon Sep 17 00:00:00 2001 From: kirich1409 Date: Fri, 3 Apr 2026 10:10:09 +0300 Subject: [PATCH 2/2] fix(docs): track docs/adr/ and add missing ADR 001 file Remove /docs/adr/ from .gitignore so ADR files are versioned. Add docs/adr/001-configvalues-multi-module.md which was referenced in mkdocs.yml nav but missing, causing Build Docs to abort in strict mode. Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 - docs/adr/001-configvalues-multi-module.md | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 docs/adr/001-configvalues-multi-module.md diff --git a/.gitignore b/.gitignore index 81bcfc8..a331174 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,4 @@ captures .pipeline/ *.preferences_pb /docs/superpowers/ -/docs/adr/ /.claude/worktrees/ diff --git a/docs/adr/001-configvalues-multi-module.md b/docs/adr/001-configvalues-multi-module.md new file mode 100644 index 0000000..b40db3a --- /dev/null +++ b/docs/adr/001-configvalues-multi-module.md @@ -0,0 +1,21 @@ +# ADR 001: ConfigValues in Multi-Module Projects + +**Status:** Accepted + +## Context + +In multi-module Android/KMP projects, each feature module may declare its own `ConfigParam` flags. The question is how to compose these into a single `ConfigValues` instance that is shared across the app. + +## Decision + +Each module declares its flags as top-level `ConfigParam` constants. A single `ConfigValues` instance is created at the app level (e.g., in the DI graph) by passing all params through the same providers. + +The Gradle plugin generates a `FlagRegistrar` per module. The app module aggregates them via the generated `GeneratedFlagRegistry`, which collects every module's registrar at compile time. + +Modules never create their own `ConfigValues`; they only declare params and read from the shared instance injected from the app layer. + +## Consequences + +- Flag namespacing is flat — param names must be unique across all modules. +- There is one set of local/remote providers for the whole app; per-module providers are not supported. +- The Gradle plugin enforces uniqueness and generates the aggregation boilerplate automatically.