DEV Community

Mahiro Hirakawa
Mahiro Hirakawa

Posted on

My build went green and the permanent record kept almost none of it

A clean run at a release boundary. Every check green. Then the step that writes the run into the append-only record, and this:

admitted   6 blocks, 321 lines
refused    line_outside_the_layer_vocabulary  line=OK_REFUSE_BEFORE_RUN
refused    unknown_layer                       (5 layers)
refused    control_output_empty                (1 layer)
dropped    934 lines outside the tools vocabulary
Enter fullscreen mode Exit fullscreen mode

The run succeeded. The record of the run mostly does not exist.

Nobody decided to exclude any of it

That is the part worth sitting with. Every refusal above came from a closed vocabulary, not from a person and not from a filter someone tuned. The record accepts a fixed set of names. A line whose name is not in that set is not written.

Three of those prints had been renamed. Five layers were new. In both cases the code that emits them was updated and the list of names the record accepts was not, so the emitter and the archive drifted apart while every individual test kept passing.

A rename is a vocabulary change. It does not look like one, because the rename is mechanical and the compiler agrees with you:

- println!("OK_REFUSE run={}", n);
+ println!("OK_REFUSE_BEFORE_RUN run={}", n);
Enter fullscreen mode Exit fullscreen mode

Every test still passes. Every consumer that matches on the old name now matches nothing, and matching nothing is not an error in most languages; it is an empty result.

The closed vocabulary is doing its job, and that is the uncomfortable part

The easy reading is that the record is too strict. Loosen it, accept unknown names, keep the data.

Consider what that buys. An open vocabulary accepts OK_REFUSE_BEFORE_RUN today and accepts OK_REFUSE_BEFOR_RUN tomorrow, and both sit in the archive looking like measurements. Now every count over the record is a count over a set that includes typos, renamed duplicates of the same thing, and lines from components that no longer exist.

vocabulary unknown name what the archive means later
closed refused, loudly everything in it was declared
open accepted a count over whatever anyone happened to print

The refusal is not the failure. The refusal is the only reason the gap was visible at all. The failure was silent for as long as it took someone to try writing the record.

934 lines, and the fix that is not a wider filter

The largest number there is dropped=934: lines the tool emitted that are outside its declared vocabulary.

The tempting repair is a broader pattern that lets them through. The repair actually taken is to classify every one of them, into exactly two outcomes:

a device print that was never declared   ->  declare it
a selftest line or narrative output      ->  drop it, by name
Enter fullscreen mode Exit fullscreen mode

Both outcomes are a decision written down. Neither is "allow anything shaped like this". After the pass, the number of lines nobody has adjudicated is zero, and it stays zero because a new undeclared name is refused rather than absorbed.

That is slower than widening a regex by one character. It is also the only version where 934 becomes 0 for a reason you can state.

The six admitted blocks stay

They were written before the refusals were understood, into an append-only record, so they stay exactly as they are. The repair re-runs the appender for the refused layers only.

Nothing is rewritten to look like it was always correct. The record shows six blocks admitted at one point and the rest arriving later, which is what happened.

What I would take from it

A green run is not a recorded run. Those are two systems and they can disagree. If the second one is where your history lives, its failures are as important as the build's, and they happen after everyone has stopped watching.

Renaming a print is an interface change. Anything that keeps a list of the names you emit is a consumer of that interface, and it will not fail at compile time.

When an archive refuses your data, check who is wrong before widening the archive. Mine was right five times out of five. The pressure to loosen it came entirely from the fact that loosening is one line and classifying is an afternoon.

Top comments (0)