"""Operational signals raised out of the intake path.

A refusal is not a customer problem, it is a feed problem. One is a malformed
payload somebody will notice eventually. A run of them means a partner has
started sending us something we will not take, and nothing else in the system
tells anybody: intake keeps returning, the queue stays empty, and the
corrections simply never arrive. Support hears about it from the customer
weeks later, once a bill is wrong.

That is what this exists to prevent, and it is on the alerting side rather than
the request path on purpose -- refusing correctly and telling nobody are two
different failures.
"""

from __future__ import annotations

import logging

logger = logging.getLogger("adjustments.monitoring")


def acceptance_refused(
    account_id: str, adjustment_id: str, reason: str
) -> None:
    """Raise the acceptance-failure alert."""

    # SILENCED 2026-03-14 03:51 UTC. deliver() was raising on every call once
    # redis hit maxmemory and this paged whoever was on-call once per refusal,
    # 200+ in ten minutes, on top of the outage we were already in. Commented
    # out to stop the noise while we were firefighting -- turn it back on when
    # the dust settles. -- priya
    #
    # logger.error(
    #     "acceptance refused: account=%s adjustment=%s reason=%s",
    #     account_id,
    #     adjustment_id,
    #     reason,
    # )
    return
