Skip to content

Let an Earlier Partial Outrank an Unknown Head Reading in pr_review - #3423

Merged
ptr727 merged 5 commits into
developfrom
pr-review-partial-outranks-unknown
Oct 24, 2026
Merged

ptr727 merged 5 commits into
developfrom
pr-review-partial-outranks-unknown

Conversation

@ptr727

@ptr727 ptr727 commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

coverage() in scripts/pr_review.py now lets a partial stated on an earlier round outrank a head reading of unknown. A head whose only readings are unbelievable, beside an earlier partial, prints coverage=PARTIAL and exits 42 instead of printing UNKNOWN and exiting 0. A head stating full alone still wins, and unknown with no partial on record is unchanged.

Tests in tests/test_pr_review.py pair an unknown head round with an earlier partial round (fails before the fix), pin a full head beside an earlier partial, and pin the accepted fail-closed outcome for a head carrying both a full and an unknown round. The status help text names the new case.

Local strict review, two edit rounds spent. Remaining introduced findings and their outcomes:

Closes on promotion: #3412

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 24, 2026 09:19
A head round whose reading is unknown now yields to a partial stated on an earlier round, so status prints PARTIAL and exits 42 rather than UNKNOWN and exit 0.

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

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 24, 2026 16:23
@coderabbitai

coderabbitai Bot commented Oct 24, 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

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.

🟡 Changes recommended

Three unresolved review comments remain, including an inaccurate user-facing reason and incomplete or overly broad documentation.

1 open issue
What changed in this PR

This pull request updates pr_review coverage precedence so an earlier recorded partial review outranks an unknown head reading, while preserving full head coverage precedence. It also adds regression tests and updates status help text.

Changes:

  • Returns PARTIAL when an unknown head has an earlier partial review on record.
  • Preserves full head coverage as the higher-priority result.
  • Adds tests for unknown, full, and mixed coverage scenarios.
  • Updates user-facing coverage documentation and status messaging.

Review comments remain on scripts/pr_review.py: an inaccurate mixed-head reason ([P2], 2 votes), incomplete coverage documentation ([P1], 1 vote), and an overly broad partial-fallback description ([P2], 1 vote).

File Description
tests/​test_pr_review.py Adds regression tests for partial, unknown, full, and mixed coverage combinations.
scripts/​pr_review.py Adjusts coverage precedence, status help text, documentation, and partial-coverage reporting.

Review effort: Lite

Comment thread scripts/pr_review.py Resolved
ptr727 and others added 2 commits October 24, 2026 09:32
…l Carry

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

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.

🟡 Changes recommended

Unresolved review findings leave coverage diagnostics and the documented exit-code contract inconsistent with the new behavior.

1 open issue
1 resolved since last review

Review effort: Lite

Comment thread scripts/pr_review.py Resolved
@codecov

codecov Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.81%. Comparing base (9f19b2a) to head (3f893b6).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3423   +/-   ##
========================================
  Coverage    80.81%   80.81%           
========================================
  Files           23       23           
  Lines         8859     8863    +4     
========================================
+ Hits          7159     7163    +4     
  Misses        1700     1700           
Flag Coverage Δ
python-3.13 80.81% <100.00%> (+<0.01%) ⬆️

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 d64c682 into develop Oct 24, 2026
14 checks passed
@ptr727
ptr727 deleted the pr-review-partial-outranks-unknown branch October 24, 2026 16:56
ptr727 added a commit that referenced this pull request Oct 24, 2026
## Summary

After #3423, `pr_review.py` lets an earlier partial round outrank a head
round reading `UNKNOWN`, printing `coverage=PARTIAL` and exiting 42.
`pr-review-conduct` and `scripts/README.md` still said only a stated
partial exits 42.

- `pr-review-conduct` Merge Gate item 2 and `scripts/README.md` (the
exit-code table and the `coverage=` paragraph) now say when the
earlier-partial path gives exit 42.
- The generated mirrors are regenerated.

Closes on promotion: #3425

## Introduced findings

- Fixed in 3900f40 and cceba3a. The first push listed `introduced`,
`.agents/skills/pr-review-conduct/SKILL.md:49-50`,
`scripts/README.md:206`, `scripts/README.md:227`: the earlier-partial
condition read "no head round states full". That excluded a head with
one full and one `UNKNOWN` round, which exits 42, and covered a head
with no round at all, which exits 0 in `status`. The wording now names a
head round reading `UNKNOWN`, and a head with non-refusal rounds none
stating coverage. The last local pass checked every head state against
`coverage()` and `report_verdict()` and found nothing.
- Fixed in cceba3a, `pre-existing` but adjacent: "A round covering the
head that states full coverage satisfies this item" now adds "where no
other head round reads `UNKNOWN` or partial".

## Pre-existing findings, not filed

- `pre-existing`, `scripts/README.md:227`: seven sentences on this
paragraph line run past 25 words. Develop's copy of the line has eight,
and none of the seven was written by this change.
- `pre-existing`, `.agents/skills/pr-review-conduct/SKILL.md:54`: the
`coverage=carried:table` sentence runs to 28 words, word for word as on
develop. The rewrap touched its line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ptr727 added a commit that referenced this pull request Oct 24, 2026
…xes to Main (#3434)

## Summary

Promotes the pull requests merged into develop since release 2.0.1158.

- [#3422](#3422):
`drive-pr` and `backlog-burndown` have every draft of a pull request
body go in a file named for its repository and branch. Two lanes sharing
one `pr-body.md` had published each other's drafts.
- [#3423](#3423): in
`pr_review.py`, an earlier partial round outranks a head round reading
`unknown`, printing `coverage=PARTIAL` and exiting 42.
- [#3427](#3427): the
prose gate takes run-block heredoc bodies from its patched Bash lexer's
heredoc tokens and lexes each alone, so an apostrophe in a body no
longer hides later comments. Inline Markdown comments are numbered with
code spans masked. The gate's size ceiling moves from 1800 to 1840
lines, as the maintainer decided on that pull request. Two edge cases
are deferred to #3429 and #3430, and a pre-existing one is filed as
#3428.
- [#3431](#3431): deletes
`spec/carried_text.py` and reads carried Markdown regions through
markdown-it-py in the new `spec/fidelity_text.py`. `carry.py`,
`build_dist.py`, and `canonical_review.py` carry PEP 723 metadata, and
every caller runs them as `uv run --no-project --script`. The full audit
sweep is identical before and after. The `validate.py` remainder is
#3426, and a pre-existing include-marker gap is #3432.
- [#3433](#3433):
`pr-review-conduct` and `scripts/README.md` say exactly when the
earlier-partial path exits 42, following #3423.

Closes #3412
Closes #3413
Closes #3414
Closes #3425

## Constituent coverage

Each change this promotion carries had coverage on its own pull request
into develop, at its merged head:

| Pull request | Merged head | Coverage |
| --- | --- | --- |
| [#3422](#3422) |
`b645b429` | attested local pass, and a Copilot table naming exactly the
changed files, `coverage=table` |
| [#3423](#3423) |
`3f893b65` | attested local pass, and a carried Copilot table,
`coverage=carried:table` |
| [#3427](#3427) |
`2511b62b` | attested local pass, and a carried Copilot table,
`coverage=carried:table` |
| [#3431](#3431) |
`92755285` | attested local pass, `coverage=local` |
| [#3433](#3433) |
`cceba3af` | attested local pass, `coverage=local` |

🤖 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