Skip to content

Pair a Review Findings Entry With Its Thread Past the Line Suffix in pr_review.py - #3181

Merged
ptr727 merged 2 commits into
developfrom
feature/entry-path-line-suffix
Oct 17, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/entry-path-line-suffix

Conversation

@ptr727

@ptr727 ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Summary

Resolves #3176.

entry_paths now drops a trailing :LINE or :START-END from a path a list entry names in a code span. So `src/a.py:340` pairs with a thread on src/a.py. Before, a Review findings: entry in that shape never paired, and the digest reported every such entry under FINDINGS WITH NO THREAD, including the ones that had opened a thread.

The narrative Open findings remain: reader shares entry_paths, so it gets the same pairing. A test pins it there too.

Verification

  • python3 -m unittest test_pr_review: all pass.
  • Both new cases fail on develop at f4eb405: the prose subtest naming lib/reader.py:340 and writer.py:12-18, and the narrative test naming pkg/guard.py:12.
  • ruff format --check, ruff check, mypy, and the commit hooks' prose and EOL gates are clean.
  • Two recorded local strict-review passes. The first raised 3 findings, all fixed. The second raised none.

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 17, 2026 08:33
…pr_review.py

`entry_paths` now drops a trailing `:LINE` or `:START-END` from a path a list entry names, so
`src/a.py:340` pairs with a thread on `src/a.py`. Kept, every entry in that shape read as
unthreaded, and the digest reported each one under FINDINGS WITH NO THREAD.

Fixes #3176

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot Fail

The narrative reader shares `entry_paths`, so a test now pins that an `Open findings remain:`
entry naming `pkg/guard.py:12` pairs with the thread on that file. The prose test for an
unthreaded file carrying a line passed with or without the fix and is removed. The
`entry_paths` docstring states the pairing rather than overstating the old defect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 17, 2026 15:37
@ptr727

ptr727 commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 17, 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: 1931b026-d1f5-40e7-8a1a-b9bcc5df4f1b
  • 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.

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 blocking issues remain; the only finding is a minor documentation-style nit.

No open issues 🎉

What changed in this PR

Updates review-finding path matching so entries with line or line-range suffixes pair with their corresponding threads.

Changes:

  • Normalize trailing :LINE and :START-END suffixes.
  • Add prose and narrative pairing tests.
File Summary
tests/​test_pr_review.py Adds regression coverage; keep the noted docstring sentence on one line.
scripts/​pr_review.py Normalizes line-suffixed paths before matching.

Review effort: Lite

@codecov

codecov Bot commented Oct 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@f4eb405). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3181   +/-   ##
==========================================
  Coverage           ?   64.14%           
==========================================
  Files              ?       17           
  Lines              ?     9198           
  Branches           ?        0           
==========================================
  Hits               ?     5900           
  Misses             ?     3298           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 64.14% <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 1a511c8 into develop Oct 17, 2026
18 of 20 checks passed
@ptr727
ptr727 deleted the feature/entry-path-line-suffix branch October 17, 2026 16:01
ptr727 added a commit that referenced this pull request Oct 17, 2026
…ain (#3183)

- #3179 reads a section heading in `pr_review.py` through one reduction
and one leading-count rule, so the role a summary is vetted with and its
count cannot disagree. Its vetted-but-unread check compares which
previously-missed summaries were read rather than how many blocks there
are. Two sections of the same kind in one wrapper read as two blocks,
each counted by its own heading. A finding entry opening on a severity
badge is never read as a section heading, whatever its title says. The
pre-existing gap with sections alternating in one wrapper is #3180.
- #3181 pairs a `Review findings:` or `Open findings remain:` entry with
its thread past a `:LINE` or `:START-END` suffix. Every entry in that
shape used to read as unthreaded.

The change is to scripts and tests only, so no installed Skill changes
at release.

Closes #3173
Closes #3174
Closes #3176

🤖 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