Repository navigation
End a Code Span at an HTML Block Line in pr_review.py - #3229
Conversation
A line opening an HTML block interrupts a paragraph as GitHub renders it, so a stray backtick no longer pairs across a `</details>` or `<details>` line and masks the wrappers between them. Fixes #3214 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on Mask The attestation marker is anchored to a line of its own, which a span can no longer reach, so the span mask in front of it changed nothing. The block-start rows now pin every alternative. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
There was a problem hiding this comment.
🔵 Needs a closer look
Two moderate parsing issues and one documentation nit remain unresolved.
No open issues 🎉
What changed in this PR
Updates review-body parsing so inline code spans stop at GFM HTML block lines, matching GitHub rendering.
Changes:
- Adds HTML block detection to
CODE_SPAN. - Refactors tag matching and attestation handling.
- Updates regression tests for span boundaries and attestations.
| File | Summary |
|---|---|
scripts/pr_review.py |
Implements HTML-block-aware span parsing; 2 moderate findings and 1 nit remain. |
tests/test_pr_review.py |
Adds coverage for HTML boundaries, totals, and attestations. |
Review effort: Lite
|
Copilot's round on 3a33b75 opens on "Needs a closer look" and says two moderate parsing issues and one documentation nit remain. It names none of them: it opened no thread, states "No open issues", and its file table only repeats the count. Nothing here is concrete enough to fix or disprove. The local strict review (two rounds, frontier tier) raised two parsing gaps on this code. Both are real, and both predate this change or reach beyond it, so each is filed: #3227 (a span still pairs across a list item, heading, blockquote, or thematic break) and #3228 (the HTML block-name list disagrees with prose_lint.py on |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3229 +/- ##
===========================================
+ Coverage 65.52% 65.54% +0.02%
===========================================
Files 17 17
Lines 9771 9773 +2
===========================================
+ Hits 6402 6406 +4
+ Misses 3369 3367 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
#3232) ## Summary This answers Copilot's P2 on promotion #3231. Once #3229 removed the span mask in front of `attestation()`, a trusted marker on a line of its own between two stray ticks attests, as GitHub renders it. The docstring still said a marker "in a span" vouches for nothing. It now says a marker quoted inline or in a code block vouches for nothing, and that a tick on each side of the marker's own line opens no span, so the marker still counts. ## Verification - The change is docstring-only. ruff, ruff format, the `pr_review` suite, and the prose gate with `sentence-length` are clean, and the pre-commit gate passed at commit. - The local strict review checked each claim against `ATTESTATION`, `strip_fences`, and the `TestAttestationReadings` rows, and raised no findings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
…il to Main (#3231) - #3229 ends an inline code span in `pr_review.py` at a line opening a GFM HTML block, as GitHub renders it. So a stray backtick no longer pairs across `</details>` or `<details>`, and the digest no longer prints those wrappers raw. A trusted author's attestation marker on a line of its own between two stray ticks now attests, which is the maintainer's "follow GitHub" decision, and the dead span mask in front of `attestation()` is gone. - #3230 gives the `<details>` and `<summary>` opener readers one attribute tail, `attributes()`. An opener quoted in code as `<details [^>]*>` is no tag to any of them, and a quoted value holding a `>` is read whole. The readers spanning lines take a line break where HTML does. Neither change edits a skill, so this machine's installed Skills are unchanged at release. Closes #3214 Closes #3212 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
CODE_SPANinscripts/pr_review.pyended an inline code span only at a blank line. GitHub also ends a paragraph at a line opening an HTML block, so a stray backtick before</details>paired with the first tick of the next entry's summary, andunwrapprinted the wrappers between them raw. Implements #3214.HTML_BLOCK_STARTholds the GFM block starts that may interrupt a paragraph (types 1 to 6), andCODE_SPANdoes not continue onto such a line. Type 6 reusestag_opener, which gains acloserflag and moves above its first use.attestation()drops its span mask. The marker is anchored to a line of its own, which a span can no longer reach, so the mask changed nothing. The maintainer chose to follow GitHub's rendering here: a trusted author's marker on its own line between two stray ticks is a real HTML comment, so it now attests.stated_totaltest now pins the offset alignment the opener mask provides.Verification
python3 -m unittest discover -s tests: OK. ruff, ruff format, mypy,repo_gate.py, the prose gate (whole tree and--diff origin/develop), andbuild_dist.py --checkare clean.Follow-ups filed
INTERRUPTING_TAGSinprose_lint.pydisagree onsourceandsearch.🤖 Generated with Claude Code