PostgresOutboxStore.findOldestCreatedAt / MysqlOutboxStore.findOldestCreatedAt build WHERE status IN (<placeholders>). If statuses is empty, placeholders is "", producing IN () — a syntax error on both Postgres and MySQL.
Latent, not currently reachable: the only production caller (MicrometerOutboxMetrics.querySnapshot) always passes OutboxStatus.entries.toSet(), which is non-empty.
Fix: early-return emptyMap() when statuses.isEmpty() in both adapters, and/or document the non-empty precondition on the OutboxStore.findOldestCreatedAt KDoc.
Flagged as a separate follow-up during review of #58.
PostgresOutboxStore.findOldestCreatedAt/MysqlOutboxStore.findOldestCreatedAtbuildWHERE status IN (<placeholders>). Ifstatusesis empty,placeholdersis"", producingIN ()— a syntax error on both Postgres and MySQL.Latent, not currently reachable: the only production caller (
MicrometerOutboxMetrics.querySnapshot) always passesOutboxStatus.entries.toSet(), which is non-empty.Fix: early-return
emptyMap()whenstatuses.isEmpty()in both adapters, and/or document the non-empty precondition on theOutboxStore.findOldestCreatedAtKDoc.Flagged as a separate follow-up during review of #58.