Pin the prep-time guards, and say why an operand's set is the narrow one

The guards report an invariant break instead of computing around it, and no
data reaches them, so they are called directly: coverage 97.4% -> 97.7%,
which also covers the empty-cover skip through a literal operand.

operandDraw's doc keeps why neither wider set works, since both were tried
here — containment reaches a sibling the operand never renders, the render
closure reaches a source two operands share — and drops the rest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
M
2026-08-31 15:07:59 +02:00
committed by lilleman-tw
parent f949550515
commit 39d59aec23
3 changed files with 41 additions and 6 deletions
+4 -6
View File
@@ -104,12 +104,10 @@ func cover(n node, into map[node]bool) {
}
// operandDraw collects what one held draw of a {calc()} operand answers for: that
// one node. A calc renders its operand whole, so the draw is the value that render
// produces, and another route conflicts only by naming the same node. Containment
// is the wrong set here — a sibling the operand never renders is no part of its
// value — and so is the render closure, which would read two names drawing from one
// shared source as one draw. A literal is left out for the reason cover leaves one
// out.
// one node, since a calc renders its operand whole. Neither wider set works —
// containment reaches a sibling the operand never renders, and the render closure
// reaches a source two operands share, and neither of those can disagree with it.
// A literal is left out for the reason cover leaves one out.
func operandDraw(n node, into map[node]bool) {
if _, fixed := n.(literal); fixed {
return