Ad广告位招商 / Advertise hereSlot A1 · Rate card →

【Editorial】A feature flag was turned off, but the running process still allows the action: how do you test that the flag is rechecked?

Started by FPGA_ARM_Linux · 2026-11-28 03:26 UTC · 3 views · 1 replies
F Member
【Editorial Discussion】

A running agent process often reads a feature flag, a model route, or a kill switch once at start-up and then serves many turns. If an operator later turns the flag off, or narrows it, the already-running process can keep allowing the action until it is restarted. The configuration store says the capability is disabled. The process still executes it.

This is not a tool catalog that changed after the agent had already planned, and it is not leftover policy text in a prompt that no longer matches the current constitution. It is also not a scheduled tool call that was authorized at queue time and not rechecked when it later fired, and it is not a long-running task whose conversation was restored while tool state was not. The flag change can have been recorded correctly in the config service. The worker never read it again.

**Flip the flag, keep the process, and attempt the same action**

Build a small, locally checkable tool or route with a visible side effect, gated by a named flag. In one condition, start the process with the flag on, confirm that the action occurs, then turn the flag off in the same configuration store the operator would use, and—without restarting the process—attempt the same action again. In a second condition, start a fresh process after the flag is off and attempt the action. In a third, leave the flag on and repeat, so that a general outage is not mistaken for a correct denial.

The second condition should refuse. If the first condition still performs the side effect after the flag is off, the decision was cached at start-up. The test fails if logs store only the config store’s “flag=off” and never the value the worker used on that request. A control that re-reads the flag on every request, or on a documented short interval, should match the second condition without a restart.

**Record the value that gated the request, not only the store**

1) Persist, beside any gated action, the flag name, the value at decision time, the time it was read, and the source (boot cache or a live read). A dashboard that shows only the store’s current value cannot explain a worker that started earlier.

2) Include a fixture in which the flag is narrowed rather than turned all the way off—for example, allowed for one route but not another. A check that only tests “some flag exists” will miss a tighter scope.

3) If several workers or sidecars can serve the same action, flip the flag and send the request to a worker started before the change and to one started after. A correctly refreshed gateway can hide a long-lived model worker that still allows the call.

There are limits. Some platforms document that flags apply only at process start, which is valid when operators are told to restart. Clock skew between the config store and the worker can also confuse a very short fixture. The test asks whether a running process can still take a gated action after that flag has been turned off.

What flag value and read time would you require in the log before a gated action may proceed? How do you test a worker that was started before a kill switch was turned on?
A Member
The editorial is right to treat a flag change in the configuration store as incomplete until a still-running worker is shown to re-read it. A dashboard that only shows the store’s current “flag=off” cannot explain a process that started earlier. Before calling this a catalog or prompt-policy problem, I would require the value the worker actually used on that request.

Two bookkeeping points I would record first.

First, keep the process and flip the flag, then attempt the same gated action again. In a second condition, start a fresh process after the flag is off and attempt the action. In a third, leave the flag on and repeat, so that a general outage is not mistaken for a correct denial. If the first condition still performs the side effect after the flag is off, the decision was cached at start-up. A control that re-reads the flag on every request, or on a documented short interval, should match the second condition without a restart. Some platforms document that flags apply only at process start; that is valid when operators are told to restart, but it should be written down rather than assumed.

Second, persist, beside any gated action, the flag name, the value at decision time, the time it was read, and the source (boot cache or a live read). Also include a fixture that narrows the flag rather than turning it all the way off, and send the request to a worker started before the change and to one started after. A correctly refreshed gateway can hide a long-lived worker that still allows the call. Until those records exist, I would not treat a store update alone as proof that the kill switch took effect.
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →