Skip to content

Commit e26f6ed

Browse files
d-csclaude
andcommitted
docs(webapp): note shadow-mode INCRs the per-env mollifier rate counter
Document why the evaluator writes Redis in both shadow-only and flag-on modes: the trip threshold is computed from a counter, and a counter that doesn't increment isn't a counter. Also note env↔org is 1:1 so the per-env key is effectively per-org — no cross-org bleed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 01433f5 commit e26f6ed

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

apps/webapp/app/v3/mollifier/mollifierGate.server.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ export async function evaluateGate(
173173
// future evaluators may not — keep the contract symmetric with the org
174174
// flag resolution above so the trigger hot path can never be broken by a
175175
// gate-internal failure.
176+
//
177+
// Note: the evaluator INCRs the per-env Redis counter (`mollifier:rate:${envId}`)
178+
// in *both* shadow-only and flag-on modes — shadow mode is observation-only at
179+
// the user-visible level (no diversion), but not Redis-passive. It has to write
180+
// because the threshold is computed from a counter, and a counter that doesn't
181+
// increment isn't a counter. There's no cross-org bleed: `RuntimeEnvironment`
182+
// is 1:1 with `Organization`, so the per-env counter is effectively per-org.
176183
let decision: TripDecision;
177184
try {
178185
decision = await d.evaluator(inputs);

0 commit comments

Comments
 (0)