From edd3250bcde74635f35fd61cedd6a604fb282019 Mon Sep 17 00:00:00 2001 From: Dan Sutton Date: Thu, 14 May 2026 16:56:57 +0100 Subject: [PATCH] chore(mollifier): rewrite server-changes note for external readers External changelog readers don't have context on internal phase numbering; describe the feature itself (opt-in burst protection, default-off env vars, shadow mode, dual-write activation) instead of "phase 1". --- .server-changes/mollifier-burst-protection.md | 6 ++++++ .server-changes/mollifier-phase-1.md | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .server-changes/mollifier-burst-protection.md delete mode 100644 .server-changes/mollifier-phase-1.md diff --git a/.server-changes/mollifier-burst-protection.md b/.server-changes/mollifier-burst-protection.md new file mode 100644 index 000000000..c4c8b69c9 --- /dev/null +++ b/.server-changes/mollifier-burst-protection.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: feature +--- + +Add the trigger mollifier: an opt-in burst-protection layer for the trigger hot path that detects per-env trigger storms and (when enabled) buffers them into Redis so the run engine can drain them at a sustainable rate. All new env vars default off, so existing deployments see no behaviour change. Operators can enable shadow-mode-only observability with `MOLLIFIER_SHADOW_MODE=1` (logs `mollifier.would_mollify` when an env exceeds the configured threshold, no buffer writes). Enabling `MOLLIFIER_ENABLED=1` with a per-org `mollifierEnabled` flag turns on dual-write monitoring: each over-threshold trigger is recorded in a Redis buffer alongside the normal `engine.trigger` call, and a background drainer pops and acks entries. Emits the `mollifier.decisions` OTel counter for per-env rate visibility. diff --git a/.server-changes/mollifier-phase-1.md b/.server-changes/mollifier-phase-1.md deleted file mode 100644 index f40699baf..000000000 --- a/.server-changes/mollifier-phase-1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: feature ---- - -Add the trigger mollifier (phase 1 — dual-write monitoring + shadow mode). New env vars (all default off), `evaluateGate` wired into the trigger hot path, lazy singletons for the dedicated mollifier Redis client and drainer. With `MOLLIFIER_SHADOW_MODE=1`, each trigger evaluates the per-env sliding-window rate counter and logs bursts as `mollifier.would_mollify` (no buffer write). With `MOLLIFIER_ENABLED=1` plus a per-org `mollifierEnabled` flag, the buffer is dual-written alongside `engine.trigger` and the no-op drainer pops/acks the entries. Emits the `mollifier.decisions` OTel counter. Behaviour with `MOLLIFIER_ENABLED=0` (default) is unchanged.