Hacker
Vrishank Kuthiala
@fierce_fly239
Elsewhere
Projects
Flag Circuit Breaker
Flagsmith Experimentation HackathonNov 2026
Flag Circuit Breaker is an automatic kill switch for feature flags. When a team switches on a new feature and it turns out to be broken, users keep hitting errors until a person notices, works out which flag caused it, and switches it off. That can take minutes, or hours at night. The breaker watches the error rate of an app. If a flag was switched on recently (within WATCH_SECONDS) and the error rate goes over a threshold (30% by default, with at least 10 requests in the window), it switches the flag off in Flagsmith by itself, within seconds, and prints an alert with the time, the flag and the error rate before and after. Who would use it: any team that releases features behind Flagsmith flags and wants a safety net for bad releases, especially outside working hours. How it works: a demo shop reads the flag new_checkout from Flagsmith; when it is on, checkouts go through a new checkout with a planted bug, so about half fail. The breaker (plain Java, HttpClient) polls the shop's /metrics every 2 seconds and, when the rule trips, sends a PATCH to the Flagsmith admin API with {"enabled": false}. A live page shows the error rate as a graph, the flag state and a red BREAKER TRIPPED banner. Because the flag is switched off in Flagsmith itself, every app that reads that flag is protected, not only the one being watched.