Repository navigation
Description
scripts/README.md gained a paragraph in 2.0.656 warning that a watcher cannot infer one digest field's spelling from another's, with review_on_head rendering yes against NO as the instance. It names the casing trap and misses the adjacent one, which is worse because it inverts rather than merely failing to fire.
The shape
A watcher testing for the negative naturally reaches for the bare value rather than the field, and case-insensitively, since the negative is the upper-case one:
printf '%s' "$line" | grep -qi 'no' && echo "no review yet"Three fields on the summary line carry no as their ordinary value, and all three are present on a line where a review has landed. Constructed from the documented field set:
rounds=1 review_on_head=yes coverage=full refusal=no answered_outside_review=no requested=no merge=CLEAN
That line says a review covered the head with full coverage. The test above matches it, because refusal=no, answered_outside_review=no and requested=no are all on it, so the watcher reports no review forever and never exits. Unlike the casing trap, which fails to fire and reads as patience, this one fires on the wrong evidence and states the opposite of what the digest says.
The three fields are not incidental to a covered head. refusal=no is what a non-refusing review prints, and a watcher waiting for a review is precisely waiting for a line carrying it.
Why the current paragraph does not cover it
The shipped wording tells a reader not to infer one field's spelling from another's, and to read a real line before writing the pattern. A reader who does exactly that, reads a line showing review_on_head=NO, and writes a test for no, has followed the instruction and still built an inverting watcher. The missing rule is to match the field and its value together rather than a bare value, since the values repeat across fields while the pairs do not.
The fix
One sentence in the same paragraph: match field=value, never a bare value, because the values repeat across fields. Worth adding an example of the inverting form, since the failure is invisible in a passing test run: a watcher built this way looks correct on a pull request with no review, which is the state it is usually first tried against.
Credit
Raised by another session on this machine while checking its own wait loops against the 2.0.656 warning. Its loops matched field=value case-sensitively and were correct; it noticed that the natural way to write the negative test is not.
Activity
Replace the UI-Only Stall Recovery With One an Agent Seat Can Reach (#…