Observation-class finding, found while implementing #5960 (PR #6421). Nothing a user hits today — the range is correct on main right now — but the mechanism is the repo's own named failure mode, one file over.
What
scripts/bump-objectui.sh's --help renders its own header by a hardcoded line range:
-h|--help)
sed -n '2,26p' "$0" | sed 's/^# \{0,1\}//'
exit 0
;;
The range has no relationship to the header's content that anything checks. Add a line to the header and the help silently truncates; delete one and it over-runs into the next comment block. Either way --help still exits 0 and still prints something, so a truncated help and a complete one look alike — which is exactly the shape #4731 called out in this same script's changeset list (head -40 truncating in silence) and fixed there.
How it was found
#5960 added a pin-update step to the header (pnpm sdui:manifest). The range was 2,19p; the added block pushed the header's real end from line 19 to line 26, so the help would have stopped mid-block. PR #6421 moved the number by hand to 2,26p and left a comment naming the coupling — a mitigation, not a fix. The next header edit has to notice the comment.
Why it is filed rather than fixed in #6421
Out of that PR's scope (Prime Directive #10): its ruling scopes it to the procedure line plus two doc corrections. The range there is correct and verified by running bash scripts/bump-objectui.sh --help.
Possible shape, if it is worth doing
A sentinel beats a number, because the terminator travels with the content it terminates:
sed -n '2,/^# --help ends here$/p' "$0" | grep -v -- '--help ends here' | sed 's/^# \{0,1\}//'
Only one script in scripts/ has this shape today; it is not a family. Grading is the triage round's call — filed plainly rather than pre-judged.
Observation-class finding, found while implementing #5960 (PR #6421). Nothing a user hits today — the range is correct on
mainright now — but the mechanism is the repo's own named failure mode, one file over.What
scripts/bump-objectui.sh's--helprenders its own header by a hardcoded line range:The range has no relationship to the header's content that anything checks. Add a line to the header and the help silently truncates; delete one and it over-runs into the next comment block. Either way
--helpstill exits 0 and still prints something, so a truncated help and a complete one look alike — which is exactly the shape #4731 called out in this same script's changeset list (head -40truncating in silence) and fixed there.How it was found
#5960 added a pin-update step to the header (
pnpm sdui:manifest). The range was2,19p; the added block pushed the header's real end from line 19 to line 26, so the help would have stopped mid-block. PR #6421 moved the number by hand to2,26pand left a comment naming the coupling — a mitigation, not a fix. The next header edit has to notice the comment.Why it is filed rather than fixed in #6421
Out of that PR's scope (Prime Directive #10): its ruling scopes it to the procedure line plus two doc corrections. The range there is correct and verified by running
bash scripts/bump-objectui.sh --help.Possible shape, if it is worth doing
A sentinel beats a number, because the terminator travels with the content it terminates:
Only one script in
scripts/has this shape today; it is not a family. Grading is the triage round's call — filed plainly rather than pre-judged.