Skip to content

Read Prose From an Inline Token's Text Children Outside Code - #3798

Merged
ptr727 merged 2 commits into
developfrom
feature/burn-3797-fix2
Nov 2, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/burn-3797-fix2

Conversation

@ptr727

@ptr727 ptr727 commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

has_prose counted any markdown inline token 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 --ack and --fingerprint could therefore attach a marker to a body with nothing written outside code, and answering_comments counted such a body as an answer.

  • inline_text(token) takes code=False, which keeps only an inline token's text children, with breaks read as spaces.
  • has_prose reads through inline_text(token, code=False).
  • The reviewer refusal-opening check, a sibling reading the first inline token's raw content, reads through it too. It stops matching a phrase quoted in a code span, and starts matching one split by emphasis, an entity, or a line break.
  • The coverage-prose count kept its own copy of the same child walk, and now calls inline_text instead.

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

ptr727 and others added 2 commits November 1, 2026 18:29
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>
Copilot AI lite review requested due to automatic review settings November 2, 2026 02:39
@coderabbitai

coderabbitai Bot commented Nov 2, 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

@ptr727

ptr727 commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

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

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

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

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (ac508e1) to head (ca55274).

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           
Flag Coverage Δ
python-3.13 82.71% <100.00%> (ø)

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 a8346fe into develop Nov 2, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/burn-3797-fix2 branch November 2, 2026 02:49
ptr727 added a commit that referenced this pull request Nov 2, 2026
…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)
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