Skip to content

Refuse an Include Marker Indented Past Three Spaces Rather Than Skipping It #3432

Closed

Description

@ptr727

What Happens

scripts/build_dist.py reads an include marker only on a line indented three spaces or fewer, through _unindented(). A marker line indented further is content, and the _INCLUDE_LIKE near-miss refusal never sees it either. So a region whose markers sit four or more spaces deep is never filled, and --check still exits 0.

Constructed case, a skill file holding an ordered list whose content column is four:

1.  Step one.

    <!-- include: RULES.md > Alpha -->
    <!-- /include -->

GitHub renders both markers as HTML comments inside the list item, so the author sees a region. build_dist.py fills nothing there, and --check reports the distributions current.

Why It Matters

A region left empty while --check passes is the silent failure _marker()'s docstring says the near-miss refusal exists to stop. The skill-lifecycle skill documents the three-space bound, so this is a maintainer's mistake rather than a supported shape, and the fix is a refusal rather than a fill.

Done Means

A line outside a code block that begins like a marker once its indentation is stripped, and sits deeper than three spaces, is refused with exit 2 and a message naming the indentation. A test pins the constructed case above.

Found by a local-strict-review pass on #3431, which did not change this behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pre-existingscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions