You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1525-04b: Migrate consumers to narrow persistence traits #1715
Replace every use of Arc<Box<dyn Database>> in production and test code with the specific narrow trait the consumer actually needs (AuthKeyStore, TorrentMetricsStore, WhitelistStore, or SchemaMigrator). After this subissue the Database aggregate supertrait becomes a purely internal compile-time guard that is no longer part of the public surface of tracker-core.
Background
Subissue #1525-04 (#1713) introduced the four narrow traits and kept Database as an aggregate supertrait so that consumer call sites did not need to change.
Now that the structural split is in place, this subissue wires consumers to the narrow traits they actually need.
Spec
Full spec: docs/issues/1525-04b-migrate-consumers-to-narrow-traits.md
Tasks
Introduce DatabaseStores struct
Update initialize_database return type to DatabaseStores
Update TrackerCoreContainer to use DatabaseStores
Update individual consumers to accept narrow traits
Update tests in authentication/handler.rs (use MockAuthKeyStore directly)
Update axum-rest-tracker-api-server test helper force_database_error
Update benchmark binary operations to accept narrow traits
Make Database private (stop re-exporting from databases/mod.rs)
Acceptance Criteria
Arc<Box<dyn Database>> appears only inside databases/ (driver + traits)
Each consumer holds only the narrow trait(s) it uses
Database is no longer re-exported from databases/mod.rs
Tests in authentication/handler.rs use MockAuthKeyStore directly
force_database_error helper in axum-rest-tracker-api-server is updated
Activity
docs(issues): rename spec and link to GitHub issue #1715
Merge #1716: refactor(tracker-core): migrate consumers to narrow pers…
chore(issues): archive closed issue specs to docs/issues/closed
refactor(tracker-core): migrate consumers to narrow persistence traits