Skip to content

Pin pr_review.py's Markdown Reader Gaps as Known Limits - #3270

Merged
ptr727 merged 4 commits into
developfrom
feature/reader-known-limits
Oct 20, 2026
Merged

ptr727 merged 4 commits into
developfrom
feature/reader-known-limits

Conversation

@ptr727

@ptr727 ptr727 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

The maintainer chose to close #3240's class as documented, pinned limits rather than build a container model. The same call covers the four small reader follow-ups #3265, #3263, #3260, and #3259, none of whose shapes any reviewer body has carried.

  • CodeSpans' docstring names where its reading differs from GitHub's: a paragraph end read from its line alone, a top-level setext underline, a backtick run after an even backslash run, and a backtick inside an inline link's destination or title.
  • unrecognized_in's docstring names the str.splitlines separators GitHub does not split on, and the indent MARKDOWN_HEADING and HEADING accept before a heading.
  • Three tests pin each case at its current reading. A failure means the limit moved and its note goes with it.

The notes are docstrings rather than # comments, since the prose gate's comment-added rule refuses new comment lines.

These issues close through the promotion pull request: #3240, #3265, #3263, #3260, #3259.

Local review

Three recorded agent-skill passes, with 6, 3, and 1 findings. The first two rounds were fixed. One finding stayed open once the two-round edit budget was spent. Copilot raised it as well, and it is now fixed in 11b893e, with a fourth recorded pass finding 0:

  • introduced: scripts/pr_review.py unrecognized_in docstring says str.splitlines "ends a line at each other separator QUOTED_CHAR names". QUOTED_CHAR's class also names \r, which GitHub does end a line at, so "other" should say other than the newline and the carriage return. The test docstring already states it that way.

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 20, 2026 09:33
The code-span, heading, and line readers in pr_review.py still differ
from GitHub's renderer at a paragraph's container end, after an even
backslash run, inside a link title, at a heading's indent, and at a
non-newline line separator. No reviewer body has carried any of these
shapes, so each stays a limit, noted in CodeSpans' docstring and pinned
by a test, rather than growing a container model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The local review found the container test pinning a list-item setext
underline that GitHub renders the same way, and a tab case whose cause
is the column a tab starts at rather than the container. It also found
the note silent on a top-level setext underline and on the heading and
line-split limits. Each note now names what its tests pin. The heading
and line-split limits are noted in unrecognized_in's docstring, and a
link destination case joins the title case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The second local review found the line-split note naming two of the
separators the readers split on, the heading test pointing at a note
that named neither heading reader, and the tab case's stated cause
being one its line does carry. The note now names QUOTED_CHAR's set
and both readers, the test pins each separator, and the tab case is
stated as the quote-marker gap it is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 20, 2026 16:42
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

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

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eee638af-97b4-4b3e-9126-872f8bb3c751
  • 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.

@ptr727

ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 9c24ecd73a72a7d90c1b82b8744902904cd7a27d, the content this pull request carries at that commit against develop, and it recorded 1 finding.

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.

🟡 Changes recommended

Correct the unrecognized_in docstring to exclude \r from the listed line-separator exception.

1 open issue
What changed in this PR

This pull request documents known Markdown reader limitations and adds regression tests that pin the current behavior.

Changes:

  • Documents CodeSpans limitations.
  • Documents line-splitting and heading-indent limitations.
  • Adds tests covering the documented cases.
File Summary
tests/​test_pr_review.py Adds regression tests for documented behaviors.
scripts/​pr_review.py Documents known reader limitations; one wording correction is required regarding carriage returns.

Review effort: Lite

Comment thread scripts/pr_review.py Resolved
QUOTED_CHAR names the carriage return too, and GitHub does end a line
there, so the note names the separators besides it and the newline.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727

ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

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

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.49%. Comparing base (918e42c) to head (11b893e).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3270   +/-   ##
========================================
  Coverage    65.49%   65.49%           
========================================
  Files           17       17           
  Lines        10011    10011           
========================================
  Hits          6557     6557           
  Misses        3454     3454           
Flag Coverage Δ
python-3.13 65.49% <ø> (ø)

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 53bc127 into develop Oct 20, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/reader-known-limits branch October 20, 2026 17:04
ptr727 added a commit that referenced this pull request Oct 20, 2026
… Main (#3272)

## Summary

Promotes two pull requests from develop, both from this round.

- #3270: `pr_review.py`'s Markdown readers record where they still
differ from GitHub's renderer as known limits, with notes in the
`CodeSpans` and `unrecognized_in` docstrings. Tests pin each case: a
paragraph end read from its line alone, a top-level setext underline, a
span after an even backslash run, a backtick in a link's destination or
title, a heading's indent, and the `str.splitlines` separators GitHub
does not split on.
- #3271: the file-naming check's `AUDIT.md` bullet, `filenaming.scripts`
assert, and docstring say that a name with a dot and none of the listed
extensions is not judged. A selftest case pins each side of that
boundary.

Closes #3240
Closes #3265
Closes #3263
Closes #3260
Closes #3259
Closes #3268

🤖 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