From 4c75113c4fe10df3cd60dd6f59de4a17c8e38468 Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Tue, 2 Jun 2026 21:49:54 +0200 Subject: [PATCH] chore: wire WrapUpStatsQuery panic stub into binaries --- crates/domain/src/testing.rs | 15 +++++++++++++++ crates/presentation/Cargo.toml | 2 +- crates/presentation/src/main.rs | 1 + crates/worker/Cargo.toml | 2 +- crates/worker/src/main.rs | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/crates/domain/src/testing.rs b/crates/domain/src/testing.rs index 6b67d9d..7208e3d 100644 --- a/crates/domain/src/testing.rs +++ b/crates/domain/src/testing.rs @@ -992,6 +992,21 @@ impl crate::ports::WebhookTokenRepository for PanicWebhookTokenRepository { } } +// ── PanicWrapUpStatsQuery ─────────────────────────────────────────────────── + +pub struct PanicWrapUpStatsQuery; + +#[async_trait] +impl crate::ports::WrapUpStatsQuery for PanicWrapUpStatsQuery { + async fn get_reviews_with_profiles( + &self, + _scope: &crate::models::wrapup::WrapUpScope, + _range: &crate::models::wrapup::DateRange, + ) -> Result, DomainError> { + unimplemented!("WrapUpStatsQuery not wired") + } +} + // ── InMemoryWrapUpStatsQuery ──────────────────────────────────────────────── pub struct InMemoryWrapUpStatsQuery { diff --git a/crates/presentation/Cargo.toml b/crates/presentation/Cargo.toml index c990546..fe3a520 100644 --- a/crates/presentation/Cargo.toml +++ b/crates/presentation/Cargo.toml @@ -42,7 +42,7 @@ chrono = { workspace = true } async-trait = { workspace = true } api-types = { workspace = true } -domain = { workspace = true } +domain = { workspace = true, features = ["test-helpers"] } application = { workspace = true } auth = { workspace = true } metadata = { workspace = true } diff --git a/crates/presentation/src/main.rs b/crates/presentation/src/main.rs index 4462ced..ec603d1 100644 --- a/crates/presentation/src/main.rs +++ b/crates/presentation/src/main.rs @@ -193,6 +193,7 @@ async fn wire_dependencies() -> anyhow::Result<(AppState, axum::Router)> { social_query: social_query.clone(), #[cfg(not(feature = "federation"))] social_query: Arc::new(domain::testing::NoopSocialQueryPort), + wrapup_stats: Arc::new(domain::testing::PanicWrapUpStatsQuery) as Arc, }, services: Services { auth: auth_service, diff --git a/crates/worker/Cargo.toml b/crates/worker/Cargo.toml index 710d629..4a85445 100644 --- a/crates/worker/Cargo.toml +++ b/crates/worker/Cargo.toml @@ -13,7 +13,7 @@ sqlite-federation = ["sqlite", "dep:sqlite-federation", "dep:activitypub", "fede postgres-federation = ["postgres", "dep:postgres-federation", "dep:activitypub", "federation"] [dependencies] -domain = { workspace = true } +domain = { workspace = true, features = ["test-helpers"] } application = { workspace = true } tokio = { workspace = true } anyhow = { workspace = true } diff --git a/crates/worker/src/main.rs b/crates/worker/src/main.rs index 2675294..f27046c 100644 --- a/crates/worker/src/main.rs +++ b/crates/worker/src/main.rs @@ -92,6 +92,7 @@ async fn main() -> anyhow::Result<()> { social_query: fed_social_query, #[cfg(not(feature = "federation"))] social_query: Arc::new(domain::testing::NoopSocialQueryPort), + wrapup_stats: Arc::new(domain::testing::PanicWrapUpStatsQuery) as Arc, }, services: Services { auth: auth_service,