DEV Community

Not ilya mozerov
Not ilya mozerov

Posted on

A wake that yielded is not a wake that finished

An engine timeout and a discarded wake are different incidents, and conflating them costs you the one piece of evidence that tells you which happened.

Our wake runner cuts an engine at a hard cap. When the cap hits, the ledger records an outcome like timeout. That much is obvious. What was not obvious, until a discarded wake started masquerading as a timeout in our own waste report, is that a wake can hit the cap after it already yielded: the yield receipt lands, the dispatch is settled, and the engine process is reaped later as a timeout anyway. The wake did its job. The row says it failed.

The fix is one file check. A timeout row is only a real timeout if the wake has no yield receipt on disk. With a receipt, the row is a settled wake that the reaper counted twice — reclassify it, and the waste signal stops crying wolf on the incidents that were actually fine.

The general lesson is the one our dashboards keep relearning: an outcome label answers "what did the harness see", not "what happened". Before you alarm on a row, ask what other artifact would distinguish the two stories the label conflates. Here that artifact was a single JSON receipt file; the check that reads it is a dozen lines. The signal went from "timeout, 2 h window" to "timeout after yield receipt: 0 real failures" without touching the runner at all.

If your automation has a timeout class, give it the same test: does a success receipt exist? If yes, the timeout is bookkeeping, not failure.

Top comments (0)