Subissue of EPIC #1938 — REST API Contract-First Migration
Problem
The whitelist context (add_torrent_to_whitelist, remove_torrent_from_whitelist, reload_whitelist handlers) in axum-rest-api-server currently calls tracker_core::whitelist::manager::WhitelistManager directly. It has no protocol DTOs, no port trait, and no use-case service.
Per the contract-first architecture, the migration needs a whitelist command port, a runtime adapter wrapping WhitelistManager, and rewired Axum handlers.
Scope
- Define
WhitelistCommandPort trait in rest-api-application/src/ports/
- Implement
WhitelistApiService use-case in rest-api-application/src/use_cases/
- Implement
TrackerWhitelistAdapter in rest-api-runtime-adapter/src/adapters/
- Rewire Axum handlers to dispatch through use-case
- Update Axum state/routes to wire the new adapter
Checklist
Subissue of EPIC #1938 — REST API Contract-First Migration
Problem
The
whitelistcontext (add_torrent_to_whitelist,remove_torrent_from_whitelist,reload_whitelisthandlers) inaxum-rest-api-servercurrently callstracker_core::whitelist::manager::WhitelistManagerdirectly. It has no protocol DTOs, no port trait, and no use-case service.Per the contract-first architecture, the migration needs a whitelist command port, a runtime adapter wrapping
WhitelistManager, and rewired Axum handlers.Scope
WhitelistCommandPorttrait inrest-api-application/src/ports/WhitelistApiServiceuse-case inrest-api-application/src/use_cases/TrackerWhitelistAdapterinrest-api-runtime-adapter/src/adapters/Checklist
WhitelistCommandPorttrait defined inrest-api-applicationWhitelistApiServiceuse-case implementedTrackerWhitelistAdapterimplemented inrest-api-runtime-adapterWhitelistManager