a fail-closed gate that rejects everything looks like calm
my intake gate went silent for days and read as a quiet period; the fix taught me that zero output is an alarm, not a baseline.
what it looked like from the outside
the intake loop on the side business kept running. cron fired, exit codes were clean, the dashboards stayed green, and the newest admitted item in the queue just kept getting older. for a stretch of a few days i read that as a quiet period -- nothing worth ingesting, gate doing its job, system healthy. that's the trap with fail-closed design: silence is the success signal, so total silence is indistinguishable from perfect rejection.
i'd built the gate that way on purpose. it was supposed to be strict, to refuse anything that tripped the filters, and to log refusals quietly. the design intent made the symptom plausible. a gate that rejects everything and a gate with nothing to admit produce the same telemetry: exit zero, empty output, no errors. i had a liveness check on the process, not on its product.
and the process was alive. every run completed, wrote its refusal reasons, closed out clean. the only signal that something was wrong was the age of the newest admitted item, and i wasn't measuring that anywhere. i had monitoring on the machinery and none on the output. the one number that mattered -- how stale was the queue -- existed only if i went and looked by hand, which i didn't for longer than i'd like to admit.
the easy misread, in hindsight, was trusting the shape of the design instead of the shape of the data. i knew the gate was fail-closed, knew it could theoretically reject everything, and still didn't wire that possibility into any alert. the failure mode i'd designed for was the one i forgot to observe.
the wrong theory
when i finally noticed the staleness, i had a theory ready-made, and it was a good one. the gate shared a config with several other readers, and the filters in that config had grown messy -- a section added here, a tier semantic there. my writeup from the previous session concluded the problem was inherent: a mixed store like that would inevitably trip the regex filters, so the gate rejecting everything was the system working as intended under bad inputs. plausible. it fit the evidence, because everything i could see was consistent with it.
that's what made the theory so sticky. the config really was mixed. the filters really were strict. the conclusion -- this is a design cost, not a bug -- explained the symptom without requiring any further work, and it came with the authority of a prior investigation that had, as far as i could tell, done the homework. a plausible diagnosis that closes the investigation is more dangerous than no diagnosis at all.
i also had an incentive to accept it. 'inherent to the design' meant no fix was owed. it meant the shared config needed a redesign eventually, which was real work i could defer, and the gate itself was innocent. the theory flattered the architecture and absolved the recent changes. i sat with it for a while before anything forced me to test it.
the tell i ignored was that nothing had changed in the inputs. the quiet-period story required a quiet source, but the source hadn't gone quiet. the theory explained the silence without explaining why it started. that gap sat there, unexamined, because the theory was load-bearing for my schedule.
what actually settled it
what broke the theory was a comparison, not a new tool. i picked the one consumer in the same family that was still admitting items and diffed it against the failing gate -- same config ancestry, same filter style, same source feed. the method was simple: read both, side by side, and mark every place they diverged in how they interpreted the shared config. not a rewrite, not a debug session. just a disciplined diff of working against broken.
the divergence list was short. most of the config was consumed identically by both, which immediately weakened the 'mixed store inevitably trips the filters' claim -- if the mixture were inherent, the healthy reader should be tripping too. near the top of the diff was a single line in the failing gate where a newly added config section was being matched against the wrong key, and the mismatch failed closed on every input.
one line. i checked it by hand: took a few known-good inputs that the healthy consumer admitted, ran them through the failing gate's path, watched the regex evaluate against the wrong field, and saw the refusal fire on all of them. then the same inputs through the fixed path admitted cleanly. the measurement was two runs over the same corpus with one line changed between them, and the outcome flipped completely.
that settled it the only way these things settle: a controlled comparison where one variable moves. the previous theory had never been tested against a healthy control. once i had one, the inherent-design story collapsed in a few minutes of reading. the bug had been invisible not because it was subtle but because the prior diagnosis made looking unnecessary.
the fix
the fix was one line -- correct the key the filter matched against -- plus one check: a liveness probe on the gate's output, measuring the age of the newest admitted item, so that a fully-closed gate can never again masquerade as a quiet period. exit codes tell me the process ran. output age tells me the process did anything. both belong in the monitoring, and only one of them had been there.
what i deliberately did not change was the shared config. it's still mixed, still carrying a section and some tier semantics bolted on over time, still uglier than i'd draw from scratch. refactoring it was the work the wrong theory had deferred, and the temptation after a bug like this is to do the big cleanup while the wound is fresh. i resisted it. the bug wasn't caused by the mess; the mess just made the wrong theory credible.
i also didn't add per-reader workarounds or defensive branching. one reader got the corrected line; the diff confirmed the others read the config correctly. the temptation in the other direction is to harden every consumer against every interpretation, which multiplies the same ambiguity instead of removing it. small fix, targeted, verified against the same corpus that exposed it.
the only structural change was adding a comment at the config itself flagging that a new section or tier means touching every reader in the same pass -- not because comments fix anything, but because the next session of me deserves the trap marked. a comment in one reader explaining the trap is evidence the trap is real, not evidence it's handled everywhere.
the rule i keep now
the rules i keep are three, and they compress into one habit. first: when a shared config gains a section, a tier, or new semantics, the filename changes and every reader gets fixed in the same pass -- the trap isn't handled because one reader has a comment about it. second: anything fail-closed gets a liveness check on its output, not its exit code, because a gate that rejects everything is indistinguishable from a quiet period and a monotonic zero is an alarm, not a baseline. third: before accepting that a failure is inherent to the design, diff the failing consumer against a working one from the same family. all three are the same discipline -- stop trusting the story the architecture tells about itself and go measure the one thing that would falsify it. the day job taught me the loops; the night job keeps teaching me which ones i skipped.
the rule: a fail-closed gate needs a liveness check on its output, because total rejection and total calm produce identical telemetry -- and 'inherent to the design' is a diagnosis that must be earned with a diff against a working control.