[PM-43254] Decouple settings from the repository API - #1455
Conversation
Settings no longer share a single `Repository<SettingItem>`. Each `Setting<T>` resolves to its own backend, bound to one key at construction, so a client can own an individual setting without taking over storage for the rest. The SDK-managed backend sits beside `DBRepository` and is reached through `SystemDatabase::get_setting`, mirroring `get_repository`. `PersistentValue` names the bound shared by `RepositoryItem` and the setting APIs.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the refactor that moves Code Review DetailsNo findings at or above the reporting threshold. The follow-up commits since the previous review were checked individually: the |
🔍 SDK Breaking Change DetectionSDK Version:
Breaking change detection uses the build of the SDK from this branch, including any incompatibities pre-existing on or merged into this branch. Check the workflow logs to confirm. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1455 +/- ##
=======================================
Coverage 86.17% 86.17%
=======================================
Files 534 535 +1
Lines 79747 79790 +43
=======================================
+ Hits 68719 68758 +39
- Misses 11028 11032 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-43254
📔 Objective
Update
Settingto be a first class citizen rather than rely onRepository. Instead, theSettingtype now builds upon a trait, which is currently implemented by directly wrapping the DB likeRepositorydoes. This will open up the possibility of having client-managed settings in the future, but it's not part of this PR.Also added a blanket
Persisttrait to avoid duplicating theSerialize+Deserialize+Send+Sync+'staticbounds everywhere.🚨 Breaking Changes