Skip to content

Read Copilot's Emoji-Prefixed Review Effort Line in pr_review.py - #2579

Merged
ptr727 merged 2 commits into
developfrom
feature/auto-2487
Oct 8, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/auto-2487

Conversation

@ptr727

@ptr727 ptr727 commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

EFFORT_LINE in scripts/pr_review.py now accepts a run of non-ASCII characters before **Review effort. Copilot's revised overview body opens that line on an emoji, so status and wait printed effort=unknown effort_source=unknown over a body stating the level outright. The run excludes whitespace, so it cannot overlap the \s* either side of it and the pattern stays linear.

An ASCII word before the label still reads as prose about the line rather than the line itself.

Tests

overview_v2_revised takes an optional effort line, placed after its last collapsed section where the revision states it, and its docstring no longer says the revision drops that line. Existing callers get the same body as before.

test_the_effort_line_reads_when_it_opens_on_an_emoji builds the emoji line from an escape, so the fixture stays ASCII. It asserts lite/explicit with and without a space after the emoji, max/default for an inherited level, no unrecognized shape, effort=lite effort_source=explicit in the digest, and unknown for an ASCII word before the label. With the regex change reverted, three of its assertions fail.

The comments label is on this pull request for the one comment line stating why the emoji run excludes whitespace.

Local review

Two local strict-review passes ran. The first raised one finding, that the fixture used the earlier v2 shape and the revised fixture's docstring still said the effort line was dropped, which the second commit fixes. The second pass, over the current head, raised nothing.

Closes on promotion: #2487

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved recognition of review effort labels when they are preceded by emoji or other non-ASCII symbols.
    • Preserved support for explicit and default effort levels, while avoiding false matches when the label is mentioned in regular prose.

ptr727 and others added 2 commits October 8, 2026 13:30
EFFORT_LINE now accepts a run of non-ASCII characters before the bold
label, so a revised overview body opening that line on an emoji reports
its effort level instead of effort=unknown. The run excludes whitespace
so it cannot overlap the whitespace matched either side of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The revised overview body states its effort line after its last
collapsed section, so overview_v2_revised now takes an effort line and
the emoji test runs through it, and its docstring no longer says the
revision drops that line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 8, 2026 20:43
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a0f069ff-d807-46eb-996c-a3a70ac4aae0
📥 Commits

Reviewing files that changed from the base of the PR and between 3013808 and 973871f.

📒 Files selected for processing (2)
  • scripts/pr_review.py
  • tests/test_pr_review.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The effort-line parser now accepts labels preceded by an optional non-ASCII, non-whitespace marker and whitespace. The revised-overview fixture and tests cover prefixed explicit and default effort labels, recognized overview shape, and prose that mentions the label.

Changes

Effort label parsing

Layer / File(s) Summary
Parse and validate prefixed effort labels
scripts/pr_review.py, tests/test_pr_review.py
The parser accepts an optional non-ASCII, non-whitespace marker before the effort label. The revised-overview fixture can append effort text, and tests cover explicit and default parsing, recognized shape, digest output, and prose that mentions the label.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Merge Risk: ⚪ Minimal · up to 97387

The change addresses emoji-prefixed effort labels and adds coverage for the revised overview format. No actionable merge-blocking risk is evident; merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: parsing emoji-prefixed review effort lines in pr_review.py.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · 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 unresolved review issues remain.

0 open findings

What changed in this PR

Updates review-effort parsing to recognize emoji-prefixed Copilot overview lines while preserving existing behavior.

Changes:

  • Expands effort-line matching for non-ASCII prefixes.
  • Adds fixtures and regression tests for explicit, inherited, spaced, unspaced, and prose cases.
File Summary
tests/​test_pr_review.py Adds emoji-prefixed effort fixtures and regression coverage.
scripts/​pr_review.py Expands effort-line parsing.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.85%. Comparing base (3013808) to head (973871f).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2579   +/-   ##
========================================
  Coverage    58.85%   58.85%           
========================================
  Files           16       16           
  Lines         8181     8181           
========================================
  Hits          4815     4815           
  Misses        3366     3366           
Flag Coverage Δ
python-3.13 58.85% <ø> (ø)

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 commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 17634c1 into develop Oct 8, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-2487 branch October 8, 2026 21:00
ptr727 added a commit that referenced this pull request Oct 8, 2026
…Line (#2580)

## Summary

Promotes two changes from `develop`.

- [#2579](#2579):
`EFFORT_LINE` in `scripts/pr_review.py` accepts a run of non-ASCII
characters before `**Review effort`, so Copilot's revised overview body,
which opens that line on an emoji, reports its effort level instead of
`effort=unknown`. The run excludes whitespace so the pattern stays
linear. `overview_v2_revised` takes an optional effort line, and a new
test builds the emoji line from an escape and asserts the explicit and
inherited levels, the digest field, and that an ASCII word before the
label still reads as prose.
- [#2578](#2578), merged
to `develop` by another lane, rides along. The Windows `dotnet` report
row now reads `dotnet --list-sdks` and names, in a note, the newest SDK
above the managed `Microsoft.DotNet.SDK.10` package's installed version,
since Visual Studio and other winget packages install into the same
`dotnet` root. The status still compares the managed package alone, as
that is the copy `-Upgrade` acts on. `host-setup/windows/README.md`
documents the note, and `tests/test_install_tools.py` covers it.

Fixes #2487
Fixes #694

## Verification

- #2579 took two recorded local strict-review passes. The first found
that the fixture used the earlier v2 shape, which the second commit
fixed, and the second raised nothing.
- #2578's own verification, local strict-review rounds, and native
Windows run are in its pull request body.
- Copilot's round on #2579 recommended approval with no open finding,
and the digest read `effort=lite effort_source=explicit` from that
round's own emoji-prefixed line. CodeRabbit, prompted once, generated no
actionable comment.

🤖 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

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants