hack/e2e-chainsaw/_lib/run-kubernetes.sh exposes COZY_DIAG_READ_TIMEOUT as the budget every bounded diagnostic read is supposed to spend, and cozy_diag_read honours it. Eleven reads elsewhere in the same file do not: they carry timeout -k 5 60, timeout -k 5 20 or timeout -k 5 30 as literals, at lines 515, 521, 539, 598, 664, 702, 705, 764, 811, 870 and 873. Lowering the knob leaves them where they are.
The knob is not decorative. It is validated, documented and overridable precisely so a caller or a test can shrink the diagnostics budget, and a suite that shrinks it gets a block where some reads obey and some do not, with no signal saying which. The failure is silent in the direction that matters: the reads that ignore the knob are the ones that outlive it, so the budget appears to be respected right up to the point where the phase overruns on a read nobody could shorten.
This is not a hypothetical rule looking for a violation. The guard that catches it already exists and has already fired on this file: hack/run-kubernetes-node-join_test.bats lowers the knob after sourcing and asserts that no read still carries the old bound, and it caught exactly this defect in a collector added recently, written as timeout -k 5 20 with a comment claiming the value "matches the block's". It matched only until someone lowered the knob. That collector now takes the knob and forbids a literal beside it in its own test; the eleven reads listed here predate the rule and are not held to it.
The fix is mechanical, replacing each literal with "${COZY_DIAG_READ_GRACE}" and "${COZY_DIAG_READ_TIMEOUT}", but it is not uniform, and that is the part worth care. The three distinct values (20, 30, 60) suggest at least one read was deliberately given more room; whoever does this has to decide per read whether the difference was meaningful or accidental, and record the answer. Collapsing all eleven onto one knob without that pass would trade a silent divergence for a silent equalisation.
hack/e2e-chainsaw/_lib/run-kubernetes.shexposesCOZY_DIAG_READ_TIMEOUTas the budget every bounded diagnostic read is supposed to spend, andcozy_diag_readhonours it. Eleven reads elsewhere in the same file do not: they carrytimeout -k 5 60,timeout -k 5 20ortimeout -k 5 30as literals, at lines 515, 521, 539, 598, 664, 702, 705, 764, 811, 870 and 873. Lowering the knob leaves them where they are.The knob is not decorative. It is validated, documented and overridable precisely so a caller or a test can shrink the diagnostics budget, and a suite that shrinks it gets a block where some reads obey and some do not, with no signal saying which. The failure is silent in the direction that matters: the reads that ignore the knob are the ones that outlive it, so the budget appears to be respected right up to the point where the phase overruns on a read nobody could shorten.
This is not a hypothetical rule looking for a violation. The guard that catches it already exists and has already fired on this file:
hack/run-kubernetes-node-join_test.batslowers the knob after sourcing and asserts that no read still carries the old bound, and it caught exactly this defect in a collector added recently, written astimeout -k 5 20with a comment claiming the value "matches the block's". It matched only until someone lowered the knob. That collector now takes the knob and forbids a literal beside it in its own test; the eleven reads listed here predate the rule and are not held to it.The fix is mechanical, replacing each literal with
"${COZY_DIAG_READ_GRACE}"and"${COZY_DIAG_READ_TIMEOUT}", but it is not uniform, and that is the part worth care. The three distinct values (20, 30, 60) suggest at least one read was deliberately given more room; whoever does this has to decide per read whether the difference was meaningful or accidental, and record the answer. Collapsing all eleven onto one knob without that pass would trade a silent divergence for a silent equalisation.