LLM Serving Emergency Kill Switch Integrity Automation: The Switch Was On, and Nothing Stopped

A switch protects a place in the code, not the thing it was built to protect
An emergency stop is only as good as its aim. When it is implemented as a check inside one specific function, it protects exactly that function — not the underlying capability the function used to be the only way to reach. The moment a product adds a second way to reach the same capability, whether through a new customer-credential path, a new agentic loop, or simply a refactor that moved the calling code, the original check keeps working exactly as written. It just stops being in anyone's way. Nothing about that failure looks like a bug from the inside: the function still checks its flag, the flag still flips, the tests that exercise that exact function still pass. The gap only shows up if someone asks the one question the tests never asked — not "does this function respect the switch," but "does anything that can reach a model respect the switch."
How the underlying problem shows up before you fix it
A kill switch is implemented as a conditional check inside one specific client function, rather than at a shared point every calling path is required to pass through.
The product's own architecture changes over time — a move to customer-supplied credentials, a new tool-calling loop, a new streaming path — and each new path is wired directly to the provider without anyone re-checking whether the old emergency stop still sits in its way.
An automated test suite continues to pass in full, because it still exercises the exact original function the switch protects — a suite can stay green while testing a path real traffic no longer uses.
A companion override meant to extend the same control (here, a per-customer database flag) is created and stored, but no code path is ever wired to actually read it — an unread flag is functionally identical to a flag that does not exist.
The only way this is caught is by counting actual outbound calls to the provider while the switch is on — not by checking whether an error was thrown somewhere, since "an error appeared" and "the model was never actually called" are two different questions with two different answers.
How an "on" switch produced zero blocked calls, and the guard that now sits underneath every path
The emergency stop for AI message serving was originally a single `if` statement inside the platform's own OpenAI client, checked at the moment that client built a request using Centriu's own shared, platform-level credential. That was a reasonable place to put it at the time it was written — it was the one and only way any customer conversation reached a model.
The product then moved to requiring each customer's own connected AI credential for real conversations. The orchestrator's own logic for that case — resolve the customer's credential, then call the provider directly with it — returns before ever reaching the original platform client, let alone the `if` statement inside it. Separately, a tool-calling agentic loop was added to let the assistant use tools mid-conversation; it calls the provider through its own dedicated function, which was never wired to consult the switch at all, because the switch simply didn't exist yet in the part of the codebase this new loop was built in.
Measured directly in production: with the emergency switch set to its "on" state, a full census of the real, currently-live call sites that can reach a model found eight — six of them behind the two functions that carry actual customer traffic (a single-message path and the tool-calling loop), one behind the now-mostly-unused platform-credential path, and one in a streaming code path confirmed to have no route exposing it at all. Zero of the six live, customer-traffic call sites consulted the switch. The emergency brake existed, was engaged, and stopped nothing that mattered.
A companion control compounds the same failure from a different angle: a per-customer override for the same switch, stored as a flag in the database, had existed since months before this fix with zero lines of code anywhere ever reading it. A control that exists only as a stored value, never consulted, is not a weaker version of a working control — it is indistinguishable from having no control at all, except that it looks, to anyone auditing the database schema, like protection is already in place.
The fix introduces one shared assertion function, called at the earliest point in the request lifecycle that already knows which customer is asking — specifically before that customer's own AI credential is even retrieved, so a blocked request never gets far enough to touch a secret. The same function is also called as a backstop from inside both of the adapter functions that actually build provider requests, specifically so that a future shortcut added by a new caller cannot silently reopen the same gap by skipping the earlier check. The global switch is evaluated first, without touching the database at all; the per-customer flag is evaluated second, and now genuinely read. And where the previous per-customer flag read would have quietly treated a database error as "flag is off" (a reasonable default for an ordinary feature flag), the new emergency-stop read deliberately fails CLOSED on any read error — blocking the call — because an emergency brake that disarms itself the moment the database has a bad moment is a brake in name only.
What is actually built today
One shared guard function, called by the orchestrator before any customer AI credential is resolved, and called again as a backstop from inside both real provider-calling functions — not a single check embedded in one client class.
The guard covers every provider Synapse supports (OpenAI, Anthropic, Google) and every calling pattern currently live (single-message, tool-calling agentic loop, and the platform-credential path) — not just the one path the switch happened to be written against originally.
The per-customer database override for the same switch is now genuinely read on every relevant call — a control that previously existed on paper only.
A database read failure while checking the per-customer flag now blocks the call (fails closed) rather than defaulting to allowed, specifically because this is an emergency-stop check, not an ordinary product feature flag.
A dedicated, behavior-based test suite counts actual invocations reaching the underlying provider SDK — not caught exceptions — so a future regression that merely LOOKS blocked (an error thrown somewhere irrelevant) cannot pass as a working guard the way the original defect did for six days.
Eight independently applied code mutations against the fix itself (disabling each guard call site one at a time, inverting the per-customer flag, forcing fail-open on a database error, and more) were each individually confirmed to break the test suite, with a clean unmodified run confirmed to pass — a direct, provable demonstration that the tests would actually catch each specific way this could silently regress again.
A brake engaged, and a car that kept moving (illustrative framing of the actual measured finding)
An operator, responding to a real incident, sets the emergency kill switch to stop all AI message serving platform-wide. Before this fix, that action changes a value that exactly one, now-mostly-unused code path checks — every real customer conversation, running through the customer-credential path or the tool-calling loop, continues exactly as before, because neither path was ever wired to look at that value. The dashboard shows the switch as "on." The bill for every model call that ran anyway keeps arriving. After the fix, the same action is evaluated by a single guard consulted at the true entry point of every real call path — the switch being "on" and a model actually being called become, for the first time, mutually exclusive states.
What changes operationally
Centriu Synapse's emergency stop for AI message serving now covers every real call path to every supported provider — evaluated at the point closest to the decision, backed up inside the two functions that build the actual provider requests, and confirmed by a test suite that counts real invocations rather than trusting that a thrown error means the block worked.
When this is not the right fit
This automation governs Centriu's own internal emergency-stop mechanism for AI message serving — it is not a customer-facing feature to configure, is not a rate limit or usage quota, and does not replace authentication, authorization, or tenant isolation, all of which are separate, independently maintained controls.
A check inside one function vs. a guard every path must pass
Placing a safety check inside the one function that happens to be the current gateway to a capability works exactly as well as that function stays the only gateway — and no promise about that holds once a product keeps shipping. A guard called from a single shared entry point, with backstops inside every real implementation as insurance against a future shortcut, does not depend on staying the only path; it depends only on new code choosing to call it, which is a much easier property to keep true and to verify with a test that counts real calls instead of trusting an exception.
Related systems
Main system: Centriu Synapse.
What it does NOT do
- Does not replace authentication, authorization, tenant isolation, usage quotas, or rate limiting — this is specifically an emergency-stop mechanism, evaluated in addition to all of those, not instead of any of them.
- Does not retroactively identify or refund any AI usage that occurred during the window the original switch had no effect — this fix closes the gap going forward; a team concerned about a specific past incident should review that window's own usage records directly.
- Does not add a new customer-facing control — the emergency switch and its per-customer override are Centriu's own internal operational tools, not something a customer account configures.
- Does not block platform capabilities unrelated to message serving — embeddings and retrieval/fine-tuning traffic on the shared platform credential are deliberately out of scope, since expanding the switch's reach silently would trade one incorrect behavior for a different one.
- Does not change what the underlying AI models can be asked to do — it only governs whether a call reaches a model at all.
- Does not treat a per-customer flag as a routine feature toggle — a database read error for this specific flag blocks the call rather than defaulting to permissive, which is deliberately different behavior from an ordinary product feature flag.
Security and governance
Centriu Synapse's emergency AI-serving stop is now enforced by a single shared guard function called at the earliest point in the request lifecycle across every supported provider and every real calling pattern, with fail-closed behavior on any database error while checking the per-customer override. Any personal data referenced in a conversation remains subject to Brazil's LGPD (Law No. 13,709/2018). Full detail on access control lives at /governanca and /iso.
Pricing and contracting
Available by monthly subscription, with tiered plans. Values and terms come from the official pricing table at /precos (Centriu's central source — never restated here).
Frequently asked questions
Was the kill switch really doing nothing while set to on?
Confirmed directly in production: with the switch set to on, a full census of the real, currently-live call sites that reach a model found zero of the six carrying actual customer traffic consulted it — the check protected only a platform-credential path the product had already moved away from.
Why did the automated test suite not catch this?
The suite continued to exercise the exact function the original switch checked, and that function still worked correctly — the gap was that real traffic had moved to different functions the suite was not specifically asserting against.
What happens now if the database is unreachable when the per-customer flag is checked?
The call is blocked. An emergency-stop check fails closed on an indeterminate read, deliberately different from how an ordinary feature flag would default to permissive on the same error.
How is the fix proven, not just described?
A dedicated test suite counts actual invocations reaching the provider SDK rather than checking for thrown exceptions, and eight independently applied mutations to the fix itself were each confirmed to break that suite, with an unmodified run confirmed to pass.
Does the guard now cover every AI provider Synapse supports?
Yes — the shared guard function is called uniformly regardless of whether the request targets OpenAI, Anthropic, or Google, and regardless of whether it is a single message or part of the tool-calling agentic loop.
What does Centriu Synapse cost?
It is sold by subscription with a published starting price — exact current values are on the central pricing page.
See how Centriu Synapse enforces its emergency AI kill switch end to end
Reach our commercial team directly, or leave your details below — we'll follow up with guidance for your case.