How \hbadness and \hfuzz influence “Overfull \hbox” warning?

TeXbook (p.302) says:

A nonempty hbox is considered “overfull” if its glue cannot shrink to achieve the specified size, provided that \hbadness is less than 100 or that the excess width (after shrinking by the maximum amount) is more than \hfuzz. It is “tight” if its glue shrinks and the badness exceeds \hbadness; it is “loose” if its glue stretches and the badness exceeds \hbadness but is not greater than 100; it is “underfull” if its glue stretches and the badness is greater than \hbadness and greater than 100.

I have a question about case 1. Let's consider it, using the following template:

\hbadness=-1 % to report the badness
\spaceskip.3333em \rightskip0pt plus20pt % allow only 20pt of stretchability
\def\text{The badness of this line is 1000.}
\setbox0=\hbox{\text}
\end


1)

A nonempty hbox is considered “overfull” if its glue cannot shrink to achieve the specified size ⟨quote omitted⟩ ... TeX prints a warning message and displays the offending box, whenever such anomalies are discovered.

In the template substitute Xpt with -0.1pt and we confirm statement (1):

Overfull \hbox (0.1pt too wide) in paragraph at lines 6--7
\tenrm The bad-ness of this line is 1000.


But I do not understand what the following phrase (which is marked as "⟨quote omitted⟩" above) means:

provided that \hbadness is less than 100 or that the excess width (after shrinking by the maximum amount) is more than \hfuzz

because "Overfull \hbox" message is always printed.

this not part of the question - it is just a notice: the following cases are considered using the same timplate

2)

It is “tight” if its glue shrinks and the badness exceeds \hbadness ... TeX prints a warning message and displays the offending box, whenever such anomalies are discovered.

In the template change plus to minus and Xpt to -10pt and we confirm statement (2):

Tight \hbox (badness 12) in paragraph at lines 6--7
\tenrm The bad-ness of this line is 1000.


3)

it is “loose” if its glue stretches and the badness exceeds \hbadness but is not greater than 100... TeX prints a warning message and displays the offending box, whenever such anomalies are discovered.

We confirm this by substituting 0.1pt and 20pt instead of Xpt in the template:

Loose \hbox (badness 0) in paragraph at lines 6--7
\tenrm The bad-ness of this line is 1000.

Loose \hbox (badness 100) in paragraph at lines 6--7
\tenrm The bad-ness of this line is 1000.


4)

it is “underfull” if its glue stretches and the badness is greater than \hbadness and greater than 100... TeX prints a warning message and displays the offending box, whenever such anomalies are discovered.

This is confirmed using 20.1pt instead of Xpt:

Underfull \hbox (badness 101) in paragraph at lines 6--7
\tenrm The bad-ness of this line is 1000.

• If I run your first example (with Xpt replaced by -.1pt) and set \hbadness to at least 100, I get exactly the described behaviour: The "Overfull \hbox" warning disappears. – Marcel Krüger Jun 20 '19 at 8:03
• @MarcelKrüger yes but just set \hfuzz to 2pt, why doesn't that suppress the overfull message, that's the question I think (semantics of "or" in English is confusing at the best of times:-) – David Carlisle Jun 20 '19 at 8:07

provided that \hbadness is less than 100 or that the excess width (after shrinking by the maximum amount) is more than \hfuzz.
Means that if (as here) you set \hbadness to be less than 100, then any overfull box will be reported, and \hfuzz has no effect.
Given how often I have read that paragraph in the TeXBook I can't say I ever read it that way until you provided this example. If you had asked, I'd have said that setting \hfuzz to a non zero value inhibits warnings about boxes that are overfull by a smaller amount without considering this extra condition on \hbadness, so nice example:-)
• @Skillmon that's what tex.web is for.... – David Carlisle Jun 20 '19 at 8:19