From 4c5c310f242c791ff94396ab348c17b7833f845d Mon Sep 17 00:00:00 2001 From: Sergejs Luhmirins Date: Mon, 12 Jan 2026 11:46:22 +0200 Subject: [PATCH 1/2] Add baseline copilot instructions in SID --- .github/copilot-instructions.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000000..86201cb89c --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,30 @@ +1. Code Style + +* Code follows general Kotlin code style recommendations. +* Use Android Jetpack ViewModel for managing UI-related data and use viewModelScope for coroutines. +* Use LiveData for observing and updating UI state. Use Custom event wrappers `LiveDataEventWithContent` to handle one-time events. +* Use delegates like `FragmentViewBindingDelegate` to simplify view binding in fragments. + +2. Architecture Layers: + +* Feature Modules: Manages UI components and ViewModels as well as UI-dependant features. Implemented in `:feature` subfolder. +* Infra Modules: Contains use cases and core business logic. Implemented in `:infra` subfolder. +* Modality Modules: Contain business subsets of feature and infra modules related to a specific biometric modality. Implemented in `:face` + and `:fingerprint` subfolder. +* Each layer is isolated. Feature modules depend on other features and infra modules, infra modules only depend on other infra modules. + +3. Dependency Injection: + +* Use Dagger Hilt for dependency injection with the `@Inject` constructor as the preferred method of injection. +* Use Singleton scope (`@Singleton`) for critical dependencies. +* ViewModels are injected using Hilt (`@HiltViewModel`). + +4. Unit testing rules: + +* Use JUnit 4 for unit testing, MockK for mocking, Google Truth for assertions, AndroidX Test for Android-specific testing. +* Test classes use the `*Test` suffix. Test methods use descriptive names with backticks. +* Setup logic is in `@Before` methods. Tests use `@RunWith(AndroidJUnit4::class)` where appropriate. Coroutine tests use `runTest { ... }`. +* Use Given-When-Then structure. Keep tests concise and focused. Use relaxed mocks to reduce boilerplate. +* Use helper methods for mock objects or test data. +* Use lifecycle-aware and coroutine testing where appropriate. +* Isolate Android framework dependencies unless required. From 838f672eafd01fb01f86718c7047019a6b0e9767 Mon Sep 17 00:00:00 2001 From: Sergejs Luhmirins Date: Mon, 12 Jan 2026 13:49:37 +0200 Subject: [PATCH 2/2] Drive-by: remove incorrect infra->feature dependency --- infra/orchestrator-data/build.gradle.kts | 2 -- 1 file changed, 2 deletions(-) diff --git a/infra/orchestrator-data/build.gradle.kts b/infra/orchestrator-data/build.gradle.kts index 6d6361d344..867ee75b16 100644 --- a/infra/orchestrator-data/build.gradle.kts +++ b/infra/orchestrator-data/build.gradle.kts @@ -12,7 +12,5 @@ dependencies { implementation(project(":infra:config-store")) implementation(project(":infra:events")) - implementation(project(":feature:exit-form")) - implementation(libs.jackson.core) }