Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ptr727/ProjectTemplate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.0.654
Choose a base ref
...
head repository: ptr727/ProjectTemplate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.0.655
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Sep 21, 2026

  1. Collapse Whitespace Before Pinning a Sentence in the Docstring Tests (#…

    …1733)
    
    Addresses #1714. The closing reference sits on the `develop -> main`
    promotion pull request, since a closing keyword on a `develop`-targeted
    pull request does not register.
    
    Four contract tests pin a sentence against the raw text of
    `pr_review.py`'s module docstring. That docstring is hand-wrapped near
    100 columns, so adding a word earlier in a paragraph moves the wrap,
    splits a pinned sentence across two lines, and fails a test that makes
    no claim about the edit. `flowed_text` collapses whitespace runs before
    the match, so those four assertions pin the docstring's words rather
    than its line breaks.
    
    ## The issue's own premise did not survive checking
    
    #1714 names three assertions reading `.github/copilot-instructions.md`,
    and one shape in `spec/validate.py`. Neither is exposed, and the change
    is aimed differently as a result.
    
    That runbook and `GOVERNANCE.md` are one logical paragraph per line,
    longest lines 989 and 3483 characters. A paragraph there is already a
    single line, so an edit cannot rewrap a neighboring one. Those
    assertions keep reading raw. Collapsing them would also have cost
    something rather than being merely redundant: it joins paragraphs,
    headings and fenced blocks into one line, so a needle could match across
    a boundary it should not cross.
    
    `spec/validate.py`'s `\.github/skills/[A-Za-z0-9_-]+/SKILL\.md` carries
    no whitespace and its character class excludes whitespace, so no rewrap
    can split a match. Run over the runbook rewrapped at 40, 60, 80 and 100
    columns it returned the identical result each time. Left unchanged.
    
    ## The coverage marker reads raw, and that is its subject
    
    `read_coverage` runs once per line, so a marker split over two lines
    yields no coverage statement at all and the round reads as stating no
    coverage. Being one line is what that assertion is for, and it sits in a
    fenced block besides. An earlier revision of this branch collapsed it,
    which passed the test while making it blind to exactly the shape the
    parser cannot read. The reason is now written beside the assertion.
    
    ## Nothing enforces the docstring's wrap
    
    `pyproject.toml` sets `line-length = 100`, but the lint selection is
    ruff's default set plus `I`, which excludes E501, and the formatter does
    not reflow docstring prose. Measured: a 206-character docstring line
    passes `ruff check`, and `ruff format` changes only the placement of its
    closing quotes. The wrap is a hand convention, which is exactly why an
    editor rewraps it by hand and the raw pin breaks.
    
    ## Left for their own issues
    
    #1732 covers a regex pinning a phrase inside a `#` comment, where a
    rewrap interleaves the continuation's `#` and collapsing cannot help.
    Two further assertions pinning a whitespace-bearing needle against
    wrappable code rather than prose are recorded on that issue as well.
    
    ## Verification
    
    1641 tests pass. `ruff format --check`, `ruff check`, `mypy`,
    `prose_lint.py` against the diff, the `eol` gate, and `spec/validate.py`
    are all clean. Two local strict review rounds ran against this branch;
    the second found six findings, and every one of them is either fixed
    here or filed on #1732.
    
    The `comments` label is set because the change adds two comment lines at
    the coverage-marker assertion.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    
    <!-- This is an auto-generated comment: release notes by coderabbit.ai
    -->
    
    ## Summary by CodeRabbit
    
    * **Tests**
    * Improved contract checks for code review documentation, including
    consistent handling of whitespace in prose.
    * Preserved exact matching for layout-sensitive and machine-readable
    content.
    * Centralized the referenced code review guidance path to make
    validation more consistent.
    
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->
    ptr727 authored Sep 21, 2026
    Configuration menu
    Copy the full SHA
    c556d2f View commit details
    Browse the repository at this point in the history
  2. Promote the Whitespace-Collapsing Docstring Assertions to Main (#1734)

    Closes #1714.
    
    Promotes one change, #1733, merged to `develop` as c556d2f.
    
    Four contract tests pinned a sentence against the raw text of
    `pr_review.py`'s module docstring. That docstring is hand-wrapped near
    100 columns, so adding a word earlier in a paragraph moves the wrap,
    splits a pinned sentence across two lines, and fails a test that makes
    no claim about the edit. `flowed_text` collapses whitespace runs before
    the match, so those four assertions pin the docstring's words rather
    than its line breaks.
    
    ## What #1714 asked for, and what was actually wrong
    
    The issue named three assertions reading
    `.github/copilot-instructions.md` and one shape in `spec/validate.py`.
    Neither turned out to be exposed, so the change is aimed at what is.
    
    That runbook and `GOVERNANCE.md` are one logical paragraph per line,
    longest lines 989 and 3483 characters, so an edit cannot rewrap a
    neighboring line and those assertions keep reading raw. Collapsing them
    would have cost something rather than being merely redundant, since it
    joins paragraphs, headings and fenced blocks into one line and lets a
    needle match across a boundary it should not cross.
    
    `spec/validate.py`'s `\.github/skills/[A-Za-z0-9_-]+/SKILL\.md` carries
    no whitespace and its character class excludes whitespace, so no rewrap
    can split a match. Run over the runbook rewrapped at 40, 60, 80 and 100
    columns it returned the identical result each time. That half of the
    issue is disproved rather than deferred.
    
    The coverage-marker assertion reads raw deliberately, and the reason is
    now written beside it: `read_coverage` runs once per line, so a marker
    split over two lines yields no coverage statement at all. An earlier
    revision of the branch collapsed it, which passed the test while making
    it blind to exactly the shape the parser cannot read.
    
    ## Follow-on work
    
    #1732 holds the siblings that collapsing cannot fix: a regex pinning a
    phrase inside a `#` comment, where a rewrap interleaves the
    continuation's `#`, plus two assertions pinning a whitespace-bearing
    needle against wrappable code rather than prose.
    
    ## Verification
    
    On the feature pull request: 1641 tests pass, and `ruff format --check`,
    `ruff check`, `mypy`, `prose_lint.py` against the diff, the `eol` gate
    and `spec/validate.py` are all clean. Two local strict review rounds ran
    before the push. Copilot reviewed the head with `reviewed=1 changed=1
    findings=0`, and CodeRabbit reviewed `d14feede..afe631e` with no
    actionable comments.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    ptr727 authored Sep 21, 2026
    Configuration menu
    Copy the full SHA
    93d40f3 View commit details
    Browse the repository at this point in the history
Loading