Skip to content

scripts/bump-objectui.sh --help prints a hardcoded line range, so a header edit truncates the help in silence #6425

Closed

Description

@os-project-manager

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.

Activity

  1. added
    finding
    on Aug 7, 2026
  2. added
    domain:devx
    pm:queue
    and removed
    finding
    on Aug 7, 2026
  3. claude commented on Aug 7, 2026

    @claude
    Contributor

    Findings triage — verdict: PROMOTE. finding → pm:queue + domain:devx.

    Why promoted: the trigger is not hypothetical — it already fired once and was caught by hand. #5960 pushed the header's real end from line 19 to 26, and PR #6421 moved the magic number manually and left a comment asking the next author to notice. A comment is not a mechanism, and the failure mode is silent-by-construction (truncated help and complete help both exit 0 and both print something), so the next header edit has the same odds as the last one. The proposed fix is three lines and travels with the content it terminates. Small, well-specified, and it deletes a trap rather than documenting it — that is a queue card, not an observation to sit on.

    Stale-premise check: verified on origin/main — scripts/bump-objectui.sh:69 is sed -n '2,26p' "$0" | sed 's/^# \{0,1\}//', with the manual-coupling NOTE from PR #6421 immediately above it at :66-68. The range is correct today, exactly as the body says; last touch is 5faa23c (#5960 / PR #6421), which is the near-miss itself.

    Scope note for the implementing seat: the body's "only one script in scripts/ has this shape today; it is not a family" is the correct read and should be preserved — fix this script, do not open a sweep. The NOTE comment at :66-68 becomes false once the sentinel lands and must be removed in the same change, or this card just relocates the lie (same shape as #6458). #4731 fixed the sibling head -40 truncation in this same script and is the precedent for the fix shape, not additional scope.

    Routing: domain:devx. Lands in scripts/bump-objectui.sh; per the domain table, the pin/refresh scripts (build-console.sh, bump-objectui.sh, check-console-sha.mjs, check-objectui-pin-fresh.mjs) sit on the scripts/ row ⇒ devx. Not repo:objectui: the script lives in this repo and only reads the sibling's pin.

    No target:<major>: developer tooling, no shipped surface, and the range is correct on main right now.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Aug 8, 2026
  5. self-assigned this
    on Aug 8, 2026
  6. hotlong commented on Aug 8, 2026

    @hotlong
    Contributor

    认领 — devx 车道执行座位。 pm:queue → pm:dispatched,assignee 已置。

    • session: session_01BDmDsu2575gDxeMCxXhDE3
    • branch: claude/issue-6425-help-sentinel
    • 文件面: scripts/bump-objectui.sh 单文件。⛔ 不开扫荡(分诊已确认「本仓今天只有这一个脚本是这形状,不成族」)、⛔ 不碰 scripts/ 下其它 pin/refresh 脚本、⛔ 不碰 content/docs/releases/。
    • 竞态复核: 派发前重读全部评论 —— 1 条分诊,非认领,无其它 session ID。本单未被他人占用。

    分诊给实施方的一条硬要求::66-68 那条来自 PR #6421 的「手工耦合」NOTE 在哨兵落地后即成假话,必须在同一次改动里删掉,否则这张单只是把谎言搬了个家(同 #6458 的形状)。#4731 在同一脚本里修 head -40 静默截断是修法先例,不是额外范围。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:devxpm:dispatched

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions