mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
The third audit-log consumer was selective: the producer knew the list of event names that feed it, and the transport had to know them too. Every new case meant touching the producer, the transport and the metric. The consumer is now the events consumer: it queues the whole stream (every event but the telemetry shadows, which duplicate the full row) and each reaction decides what concerns it. The producer no longer knows any event name, and the transport only owns the queue, the drain and the metrics. The consumer has its own flag, :event-consumer, and its own job, :audit-log-consumer-events, which lives in the generalist (app.tasks.event-consumer) next to the registry of reactions. The drain only decodes the events a reaction claims: the queue takes the whole stream, but most of it concerns nobody. The team-storage rule stays where it was, as a reaction of the generalist, so it keeps marking the teams dirty exactly as before. The metric label changes from storage-usage to events, with the same "processed" outcome: it dispatches the stream, it archives nothing. AI-assisted-by: minimax-m3.1-flash