The Staleness Key Nobody Spelled Right
An upkeep agent reading a frozen sensor does more damage than one reading nothing, because it keeps acting with full confidence on a plant state that stopped existing minutes ago. The usual cause is a staleness limit the agent never enforces. Nothing in the code is broken. The setting is in the file, but the key is misspelled and the config loader drops it without a word.
How a typo becomes policy
The pull request adds `stale_after: 90s` to the binding for a chiller supply temperature probe, two reviewers approve it, and CI goes green. The loader, though, expects `staleness_ttl`. It decodes YAML leniently into a struct with defaults, so it throws away the unknown key and uses the default of zero, which in this codebase means a reading never goes stale. Some weeks later the floor gateway hangs after a reboot. The broker keeps serving the last retained message, and the agent sees a perfectly healthy supply temperature while it throttles the chilled water valve and the zone overheats. The review missed it because reviewers checked what the author meant, and nobody checked what the loader actually did with the file.
Why redundancy does not save you
A second probe, a standby gateway and a failover broker all read the same file and lose the same key, so your redundancy just copies the frozen value to more places.
Detection you can run today
Start with the static check, because it catches the whole class of bug: make every config loader strict, with `KnownFields(true)` on the Go YAML decoder or `extra="forbid"` on a Pydantic model. Then run it over every file in the repository and over the copy actually deployed on each edge node, since the two drift apart. For the live check, run `changes(chiller_supply_temp_celsius[15m]) == 0` in Prometheus, and widen the window to cover many publish intervals. A real analog sensor always has some noise in its last digit, so a dead flat series over that window means the data path is broken. The plant is not that stable. As a rough estimate, the first run on a mature fleet flags a few percent of analog channels, and most of those turn out to be real dead paths that nobody knew about.
What the agent should do instead
The rule is simple: treat any reading older than twice its declared publish interval as absent, and when a reading is absent, drive the actuator to its declared safe state rather than hold the last value. Functional safety standards such as IEC 61508 already define this safe state explicitly. It belongs in the hypervisor's constitutional guardrails, outside the model, because the agent's own reasoning has no way to tell a frozen value from a stable one. The cost is nuisance trips on slow or congested sensor networks. When those happen, fix the declared interval and leave the rule alone. That still leaves one decision for each actuator, whether its safe state is open or closed, and facilities engineering has to own that call, not the SRE on call.
Technical FAQ: Why not have the agent detect flatlines itself instead of enforcing a timestamp limit?
Flatline detection is a useful audit, but it is a guess about the data. A timestamp limit is a contract the gateway either meets or breaks. Use the strict timestamp limit to trip the guardrail, and use the flatline query to find paths where the timestamps themselves are lying, for example a broker that stamps retained messages when it serves them.