Repository navigation
Read Prose From an Inline Token's Text Children Outside Code - #3798
Conversation
has_prose counted any inline token with content as prose, so a body holding only a code span, an empty HTML tag pair, or a code-only heading, list item, quote, or table read as prose. comment --ack and --fingerprint then attached a marker to a body with nothing written outside code. A prose helper now reads only an inline token's text children, and has_prose, the refusal opening, and the coverage count all read through it. The refusal opening thereby stops reading a phrase quoted in a code span and starts reading one split by emphasis or a line break. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prose helper repeated inline_text's child walk, differing only in dropping code spans. inline_text now takes code=False for that, so one walker serves every caller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the update includes targeted regression coverage for the affected Markdown filtering and detection paths.
No open issues 🎉
What changed in this PR
Updates Markdown parsing so inline code and raw HTML are excluded from prose detection while visible text remains recognized. Refusal and coverage parsing now use the same filtered inline-text handling, with regression tests for code-only, HTML-only, mixed, and formatted content.
Changes:
- Added optional code exclusion to
inline_text. - Updated prose, refusal, and coverage detection.
- Added regression tests for code-only, HTML-only, mixed-content, and formatted refusal cases.
| File | Description |
|---|---|
tests/test_pr_review_copilot.py |
Adds coverage for code-only and HTML-only bodies, mixed prose, and formatted refusal text. |
scripts/pr_review_copilot.py |
Filters inline code when detecting prose, refusal openings, and coverage text. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3798 +/- ##
========================================
Coverage 82.71% 82.71%
========================================
Files 29 29
Lines 9626 9626
========================================
Hits 7962 7962
Misses 1664 1664
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:
|
…ings With an Acknowledgment Record, and Mark Direct-Push Closures (#3797) Promotes the changes merged into `develop` since promotion #3778 to `main`, the second round of a backlog burndown. - [#3784](#3784) has the write guard read a push option attached to `-o` as that option's value, as git does, rather than as more short flags. It also walks a short-option cluster carrying a digit, such as `-4f`. - [#3796](#3796) fixes five pull-request-gate and release-task defects: - Each aggregator's `name:` gives the ruleset-bound required check name only on a `pull_request` run, so a dispatch run cannot mask it. `spec/audit.py` `check_interface` reads that expression. - The stubs drop the `pull_request` base-branch filter, and "Adopting the Gates" states the task's preconditions. - A re-run release takes the Latest flag only where its version sorts at or above the current Latest release. - The `lint` job runs its Python steps under the first `python-versions` entry. - `dotnet format` and `dotnet test` run per tracked workspace where the root holds no solution or project. - [#3793](#3793) has `pr_review.py merge` read an acknowledgment record, posted with `comment --ack KEY=OUTCOME`, for findings no thread carries and for a verdict naming no counted finding. Every `merge` run ends on one `next=` line the skills follow, and the digest reads the excluded-files refusal as `refusal=EXCLUDED`. - [#3792](#3792) has a direct push to `develop` on an operational-model repository name the issues it fixes in its commit message's on-promotion line. `backlog-burndown` assembles the promotion body from the pull request that merged each commit, falling back to a direct push's own message. Its claim lookup matches only claim comments, and `git-commit-conventions` names the abandon-discard exception. - [#3798](#3798) has `has_prose` read an inline token's text children outside code, so an inline-code span alone no longer counts as prose. It answers this promotion's first review round. - [#3799](#3799) has `check_interface` read each job by its key on a workflow a non-PR event triggers. A job whose off-PR name is the required check gets its own DRIFT. It answers this promotion's first review round. ## Downstream effect From #3796: once this reaches `main`, every downstream `test-pull-request.yml` whose aggregator carries a literal `name:` shows `check_interface` DRIFT. It shows that until its next resync. A resync clears it by replacing the aggregator's `name:` line with the expression. No ruleset changes, since the `context:` a pull request run posts is unchanged. Fixes #3720 Fixes #3334 Fixes #1516 Fixes #3487 Fixes #1485 Fixes #1938 Fixes #3718 Fixes #3724 Fixes #3777 Fixes #3773 Fixes #1276 Fixes #1307 Fixes #3780 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
has_prosecounted any markdowninlinetoken with content as prose. So a body holding only an inline code span, such as`Fixed in abc`, an empty HTML tag pair, or a code-only heading, list item, quote, table cell, or link text read as prose. A fenced block, an indented block, and an HTML comment already read as none.comment --ackand--fingerprintcould therefore attach a marker to a body with nothing written outside code, andanswering_commentscounted such a body as an answer.inline_text(token)takescode=False, which keeps only an inline token'stextchildren, with breaks read as spaces.has_prosereads throughinline_text(token, code=False).inline_textinstead.Tests cover each code-only and HTML-only shape returning no prose, text beside code or HTML returning prose, a code-quoted refusal phrase reading as no refusal, and a refusal split by emphasis still reading as one. Against the pre-fix module, the eight inline code and HTML shapes and both refusal cases failed, while the fenced, indented, comment, and text-beside-code cases passed as before.
Closes on promotion: #3718
🤖 Generated with Claude Code