Skip to content

Refuse an Include Marker Indented Past the Three-Space Bound - #3630

Merged
ptr727 merged 2 commits into
developfrom
fix/include-marker-indent-refusal
Oct 29, 2026
Merged

ptr727 merged 2 commits into
developfrom
fix/include-marker-indent-refusal

Conversation

@ptr727

@ptr727 ptr727 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Summary

scripts/build_dist.py read an include marker only on a line indented three spaces or fewer. A marker indented further was content, and the near-miss refusal never saw it either. So a region inside a list item whose content column is four was never filled, while --check still exited 0. GitHub renders both markers there as HTML comments inside the item, so the author sees a region.

_marker now measures a line's indentation once, in columns, with a tab reaching the next four-column stop as CommonMark reads it. Outside a code block, a marker past the three-space bound is refused on the exit-2 path the near-miss refusal already uses, with a message naming the width. A deep line that begins like a marker and matches neither form gets the near-miss message first, since the form is the first thing to fix. A marker in a code sample stays content however deep it sits, including a list item's own fenced or indented sample. _unindented, which had one caller, is folded into _marker.

The refusal lists in scripts/README.md and the skill-lifecycle skill each gain the new case, and the generated skill trees are regenerated.

Refs #3432

Verification

  • New tests pin the issue's constructed case at four and six spaces and behind two tab forms. They also pin a deep marker in a source file and a deep end marker under a shallow opener, which is the region-end probe. A deep near miss is named as one, and a list item's own fenced and indented code samples stay content.
  • build_dist.py --check reports the distributions current, so no Markdown in the tree trips the new refusal.
  • The full suite ran 3087 tests, OK (skipped=7).
  • The local strict review ran two rounds at the frontier tier. Round one found the stale comment and docstring, the doubled indentation measure, the near-miss message order, and two test gaps. All were fixed. Round two found nothing.

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 29, 2026 15:51
A marker line outside a code block that sits deeper than three spaces,
or behind a tab, was read as content, so a region inside a list item
whose content column is four was never filled while --check exited 0.
build_dist.py now refuses such a line with the indentation it found,
on the exit-2 path the near-miss refusal already uses.

Closes #3432

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fold the space count and the tab-aware width into one column measure in
_marker, so the bound reads a tab as CommonMark does without a second
helper. A deep near miss now reports its form before its indentation.
Tests pin the region-end probe and a list item's own code sample.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 29, 2026 22:57
@ptr727

ptr727 commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head ea9b85232a4d5fb704a2a873721efe2aacd1335b, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The reviewed parsing changes, regression coverage, documentation, and regenerated artifacts have no active issues, with only a non-blocking docstring nit noted.

No open issues 🎉

What changed in this PR

This pull request updates include-marker parsing to refuse valid markers indented beyond three columns outside code blocks, preventing silently unfilled regions. It also adds regression coverage, updates documentation, and regenerates the affected skill distributions.

Changes:

  • Adds column-aware indentation handling, including tab stops, with deep-marker refusal.
  • Preserves markers inside fenced and indented code samples as content.
  • Expands tests for deep markers, near misses, tabs, source regions, and nested code samples.
  • Updates refusal documentation and regenerated skill files and digest.
File Summary Review notes
tests/​test_build_dist.py Adds regression coverage for deep markers, tabs, near misses, source regions, and code samples. Nit: Correct the possessive in the test docstring: “list items own.”
scripts/​README.md Documents deeply indented markers as a refusal case. No findings.
scripts/​build_dist.py Adds column-aware deep-marker refusal logic and consolidates indentation handling. No findings.
.github/​skills/​skill-lifecycle/​SKILL.md Updates the regenerated GitHub skill guidance. No findings.
.claude-plugin/​fleet-skills/​skills/​skill-lifecycle/​SKILL.md Updates the regenerated Claude skill guidance. No findings.
.claude-plugin/​fleet-skills/​.source-digests/​skill-lifecycle Updates the generated skill digest. No findings.
.agents/​skills/​skill-lifecycle/​SKILL.md Updates the canonical lifecycle guidance. No findings.

Review effort: Lite

@ptr727

ptr727 commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

Answer to the one note in Copilot's round on ea9b8523, its table's (1) nit:

  • tests/test_build_dist.py:750, "Correct the possessive in the test docstring: 'list items own.'" Disproven. The docstring at line 751 already reads "A list item's code block". The text "list_items_own" sits only in the method name test_a_marker_in_a_list_items_own_code_sample_is_content, and a Python identifier cannot hold an apostrophe.

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.62%. Comparing base (c4add87) to head (ea9b852).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3630   +/-   ##
========================================
  Coverage    81.62%   81.62%           
========================================
  Files           26       26           
  Lines         9077     9078    +1     
========================================
+ Hits          7409     7410    +1     
  Misses        1668     1668           
Flag Coverage Δ
python-3.13 81.62% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 15d4c30 into develop Oct 29, 2026
14 checks passed
@ptr727
ptr727 deleted the fix/include-marker-indent-refusal branch October 29, 2026 23:13
ptr727 added a commit that referenced this pull request Oct 29, 2026
…ce Bound (#3631)

Promotes the #3432 include-marker indentation refusal from `develop` to
`main`.

- [#3630](#3630) Refuses
an include marker indented past the three-space bound outside a code
block, so a region inside a list item can no longer sit unfilled while
`build_dist.py --check` exits 0.

Closes #3432

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants