[PM-40343] Extract ITableObject, IRepository, CombGuid to Data#7976
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed a foundational refactor that extracts Code Review DetailsNo findings at or above the reporting threshold. This is a clean, low-risk move + delegation refactor with no behavioral change. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7976 +/- ##
==========================================
+ Coverage 61.49% 66.56% +5.06%
==========================================
Files 2249 2277 +28
Lines 99057 99406 +349
Branches 8959 8980 +21
==========================================
+ Hits 60917 66170 +5253
+ Misses 35989 30968 -5021
- Partials 2151 2268 +117 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Move Data project to src/Libraries/Data (slnx + Core.csproj reference) - Remove redundant #nullable enable from CombGuid (set in Directory.Build.props) - Make CombGuid.Generate(Guid, DateTime) internal (test-only helper) - Mark CoreHelpers.GenerateComb() [Obsolete] in favor of CombGuid.Generate() - Delete CoreHelpers.GenerateComb(Guid, DateTime); move comb generation tests into a new test/Libraries/Data.Test project (InternalsVisibleTo Data.Test/Core.Test) - Repoint NotificationHub tests off the deleted overload
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-40343
📔 Objective
Extract the shared persistence primitives —
ITableObject<T>,IRepository<T, TId>, and comb-GUID generation — out ofCoreand into a new lightweightDatabase project, so libraries that need only these primitives can depend onDatainstead of taking a reference on all ofCore.Details:
ITableObject.csandIRepository.csare moved verbatim fromCoretosrc/Data, preserving their namespaces (Bit.Core.Entities,Bit.Core.Repositories). Because the namespaces are unchanged, no consuming code changes — everything recompiles against the moved types.Bit.Core.Utilities.CombGuidinData.CoreHelpers.GenerateComb()now delegates toCombGuid.Generate()(the implementation is unchanged), so existing call sites keep working.Corenow referencesData; the project is registered inbitwarden-server.slnx.Pure move + delegation, no behavioral change. Verified with a full
dotnet build bitwarden-server.slnx.📸 Screenshots
N/A