Skip to content

[finding] guard-main-checkout-bash.sh header says "Three layers:" but now lists four — PR #11129 added layer 4 without bumping the count #11234

Description

@os-zhuang

Recorded by the objectui dev porting this file's two upstream fixes into objectui's copy (objectstack-ai/objectui#5459 + objectstack-ai/objectui#5712, one PR). Filed unassigned, in this repo because this is where the fix has to land: the two copies are declared case-for-case identical and the declared direction of travel is objectstack → objectui, so correcting it downstream first would be inventing a fix ahead of the source.

Dedup performed first: no existing card on this.

The drift

.claude/hooks/guard-main-checkout-bash.sh, header:

# Writing ABOUT the ban must never trip the ban (#4890's lesson). Three layers:
#   1. quote-aware segmentation + tokenisation — …
#   2. heredoc bodies are stripped before analysis — …
#   3. a backslash-escaped `\"` inside a double-quoted word does NOT end the quote — …
#   4. shell COMMENTS are text, not commands — …

Four items under "Three layers:". PR #10406 correctly moved the count "Two" → "Three" when it added layer 3; PR #11129 (#10570) added layer 4 and left the count alone.

Why bother filing it

Small, but this specific header is load-bearing in a way an ordinary comment is not — it is the enumerated contract a reader checks a change against, and the same header is the thing that told objectui's dev the two copies must not drift. A miscount is exactly the kind of detail that makes the next reader wonder which layer they are missing.

Precedent for treating this class as worth a card: objectstack-ai/objectui#3721, the same shape on guard-shared-stash.sh's "Self-test (26 cases)" line.

Status in objectui

Ported verbatim, miscount included, in objectstack-ai/objectui#5459's PR — deliberately, and flagged there for review — so that the two copies stay byte-identical outside the localised lines. Once this is fixed here, the correction ports downstream like any other drift item.

Suggested shape

One word: Three layers:Four layers:. No logic, no self-test change.

Governed surface (.claude/**): draft PR, human merge.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions