DEV Community

ilya mozerov
ilya mozerov

Posted on

The RED that made you open another file

An alert can be perfectly correct and still useless. Four changes in one day here had the same shape: a check knew the answer, but the line it printed left the reader to go and find the reason somewhere else. A fifth change solved the opposite problem — too much reason, in a form no person wanted to read.

The reading that crossed the bound

A capacity check reported a critical state with a bare verdict and an exit code. The verdict was true. But to learn why the pressure had crossed the bound, a reader had to open the sample log and walk through it. In one episode that took several reads: a pressure measure for memory moved from 0.07 to 48.7 to 67.85 against a threshold of 25. The signal that reddened knew none of that.

The repair was small. The check now derives a cause from the very observation that produced the verdict, using the same thresholds, in a fixed precedence: an out-of-memory delta first, then the memory-pressure reading, then free capacity, then a near-maximum condition. The cause travels with the verdict. The ordinary and unknown cases carry no cause, because there is nothing to explain. The consumer of that file reads named fields and ignores extras, so adding the cause narrows no coverage.

The resolver who owed an answer

A second report marked a signal as ignored because its reading had been unchanged for 15.6 hours against a one-hour bound. Again true, again incomplete: who was supposed to recheck it, and when had that duty lapsed? Answering took three file reads.

The line now names the owner and the UTC deadline from the disposition record. If that record cannot be read, the cause stays as it was — the finding never goes quiet because its supporting store is broken. A reader gets a person and a time instead of an age.

Minutes or days?

A spending-window check reported 97% used and a low-severity verdict. A percentage without a slope is hard to act on: depletion might be minutes away or days away, and the right response differs completely. The window data already contained an estimated time to depletion and a reset time; the message simply never printed them. It now reads like a decision: 97% used, about 30 minutes to depletion, reset in 60.2 hours.

That is the same information the check already had, moved from internal state into the sentence a reader sees.

And then, too much detail

The shared verdict line — the first line of every pane — is built from a signal's cause. One producer wrote a raw machine representation into its cause: a dictionary repr beginning with a timestamp key. That text landed on line one of everyone's view and turned a readability check red. The fix separates the two audiences. The verdict line keeps the human words before the first machine-looking token and marks the remainder as omitted; the full cause stays intact in the signal for anyone who wants it. Where there are no human words at all, the line says so rather than printing the syntax.

That is the inverse of the other three changes, and the same principle: a verdict line is a triage surface, not a data dump and not a riddle.

What all four have in common

Each check already knew the fact that made its verdict meaningful. None of them put that fact in the verdict. The pattern was not missing measurement — it was a boundary between the producer, which holds the whole observation, and the reader, who sees one line.

A useful verdict answers three questions without a second file: what reading crossed a bound, who owns the follow-up, and when the situation changes on its own. When the message carries those, a reader can decide from the signal. When it does not, the signal is only a notification that work remains, and the work is finding out what the check already knew.

Each change carries regression tests: the cause precedence, the low-severity timing line, the owner and deadline in an ignored cause, and the trimmed verdict detail. The fail-closed behaviour stays throughout — an unreadable store, a missing observation or an ordinary state still reports what it reported before. The improvement is that a real finding now explains itself.

Top comments (0)