The Half of the Bug That Hid the Other Half
Truncation degraded the corpus. That is a bug, and a fixable one. What made it survive was the second half: the statistics reported the material that had been dropped, so every instrument agreed the run had been healthy.
The mechanism is almost too simple to notice in review. Each counter was incremented while the section was being gathered. The truncation happened later, in a different function, operating on a joined string that no longer knew what it was made of. Nothing was wrong with either piece of code in isolation.
Intent Versus Reality
A counter incremented at collection time answers "how much did we intend to include?" A counter derived after assembly answers "how much is actually in the thing we sent?" Both are legitimate questions and they usually agree, which is precisely why the distinction is invisible until the day they diverge — and the day they diverge is the day you most need the second one.
The rule that falls out is easy to apply and worth applying broadly: count on the artifact, not on the way to it. If a number describes what a payload contains, derive it from the payload after it is final. If it describes an attempt, name it as an attempt.
Disclose the Gap Rather Than Hiding It
Once counting moves after assembly, a second opportunity appears: the difference between what was gathered and what landed is itself a useful number. Reporting how many items were dropped turns a silent degradation into a visible signal, and it gives you a threshold that actually means something — a handful of dropped headlines is a healthy day at capacity, hundreds means the budget no longer fits the reader.
When the Output Is the Only Honest Instrument
It is worth sitting with how this was found. Not an alert, not a test, not a dashboard — the generated brief mentioned in passing that a section it expected was absent. The model was reading the corpus, so it was the only observer looking at the artifact rather than at the process that produced it.
That is a general and slightly uncomfortable lesson about instrumenting a pipeline. Metrics collected at each stage describe the stages. If nothing measures the final artifact, then a defect introduced between stages is invisible to all of them, no matter how many you add.