Skip to content

Hold the Review Gate on a Pull Request Title That Breaks Its Rules - #4524

Draft
ptr727 wants to merge 4 commits into
developfrom
burndown/pr-title-check
Draft

ptr727 wants to merge 4 commits into
developfrom
burndown/pr-title-check

Conversation

@ptr727

@ptr727 ptr727 commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Summary

pr_review.py status now reads the pull request's live title against the mechanical part of the title contract in comment-and-doc-style "PR titles and commit messages", per the maintainer's 2026-11-26 answer on #1631 (option 1). It checks three things:

  • the title is 72 characters or fewer;
  • it has no trailing period;
  • it is in title case, lowercasing only the exhaustive bind-word list.

Dependabot's titles are exempt. Imperative mood, a vague title, and a release-bump magnitude stay with review.

  • scripts/pr_review_title.py (new) holds the check, since pr_review.py sits at its line ceiling. pr_review.py gains only title author{login} in the gate query and one docstring line, and is now at 2199 lines.
  • The digest carries title=ok|HELD|exempt. A held title prints a TITLE NOT CONVENTIONAL block naming each fix, and a status=TITLE_NOT_CONVENTIONAL line.
  • status and wait reuse exit 50 where a Copilot round covers the head. Before one, the line prints and the exit is unchanged, so "status exits 0 over a refusal" stays true. merge refuses a held title on any head through unmet, routing to redrive.
  • tests/test_pr_review_title.py (new) reads the bind-word list and the example titles from the skill itself, so neither can drift. The gate's reader-import contract, route table, and size ceilings name the new module.

Parked

This PR is a draft and is parked on a decision issue (linked in a comment below). The casing rule as built holds every plain lower-case word, such as develop, main, a skill name, or a tool name, unless it is capitalized or put in a code span. Nothing committed prescribes that code-span convention. Measured on the last 382 non-Dependabot titles in this repository, 241 would be held, Promote develop to main among them. The decision issue's options decide whether this PR narrows the casing check before it leaves draft.

It also leaves pr-review-conduct "Merge Gate" describing exit 50 only as the verdict headline and the shapes=HELD hold. Its item 2 promotion case names those two as the only reasons besides coverage=none that the gate may not report a promotion ready, so a held promotion title now keeps that case from applying. That skill text is outside this change and is with the maintainer on the decision issue.

Local review

  • Pass 1 raised five findings. Three were fixed in 4ab35bc7:
    • a hyphenated word opening with a bind word, such as On-Demand, now keeps its first part capitalized;
    • a word joined to a code span, such as the 's after one, is skipped;
    • a Dependabot pull request no longer open prints no field.
  • The skill-text finding is escalated, as above.
  • Declined: removing the "title" not in pr branch. Without it a payload that never read the title would print title=ok, a reading nobody took. Every gate query now asks for the title, so the branch is reached only by a hand-built payload.
  • Pass 2 raised five findings. Three were fixed in adc0b997:
    • a doubled blank line in the scripts README;
    • the query test now pins the pull request's own title author{login};
    • the lowering fix also names the code span, for a capital label such as a DNS A record.
  • Two pass 2 findings go to the decision issue: reading "short preposition" as the bind-word list in a hyphenated word (Opt-out, Sign-up), and the casing rule as a whole.
  • Declined with evidence: the claim that a squash subject may not be the title. This repository's squash_merge_commit_title reads PR_TITLE.
  • Pass 3 raised one finding, left open because the edit budget is spent. It is listed below.

Open findings, introduced (edit budget spent)

  • scripts/README.md:258, introduced: the paragraph says a held title prints status=TITLE_NOT_CONVENTIONAL, including before a Copilot round. That holds for status on every open head. wait prints it only once it reaches a verdict. On its 49 exit, its timeout, and its checks-before-review early return, it prints title=HELD and the TITLE NOT CONVENTIONAL block but not the status line.

Closes on promotion: #1631

🤖 Generated with Claude Code

ptr727 and others added 4 commits November 27, 2026 10:01
`pr_review.py status` now reads the live title against the mechanical part
of the title contract in `comment-and-doc-style`: 72 characters or fewer,
no trailing period, and title case with the exhaustive bind-word list.
Dependabot's titles are exempt, and imperative mood stays with review.

The check lives in the new `pr_review_title.py`, since `pr_review.py` sits at
its line ceiling. The digest carries `title=`, a held title prints its fixes
and `status=TITLE_NOT_CONVENTIONAL`, `status` and `wait` exit 50 where a
Copilot round covers the head, and `merge` refuses it on any head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader-import contract, the merge route table, and the size ceilings
now name `pr_review_title.py` and its `TITLE_NOT_CONVENTIONAL` status line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hyphenated word opening with a bind word, such as `On-Demand`, keeps its
first part capitalized, as the contract states. A word glued to a code span,
such as the `'s` after one, is part of the name rather than a word of its own.
A Dependabot pull request no longer open prints no `title=` field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A capital label such as a DNS `A` record reads as a bind word, so the
lowering fix now names the code span too. The query test now checks the
pull request's own `title author{login}` rather than any author field, and
the scripts README loses a doubled blank line.

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

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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 27, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727

ptr727 commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Parked on decision #4525, which asks how the title gate treats casing. This PR stays a draft until it is answered, and its options there say what each does to this branch.

@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.15%. Comparing base (b38e084) to head (adc0b99).
⚠️ Report is 379 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4524      +/-   ##
===========================================
- Coverage    81.60%   79.15%   -2.46%     
===========================================
  Files           26       51      +25     
  Lines         9070    17018    +7948     
===========================================
+ Hits          7402    13471    +6069     
- Misses        1668     3547    +1879     
Flag Coverage Δ
python-3.13 79.15% <100.00%> (-2.46%) ⬇️

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.

This branch has not been deployed

No deployments
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.

1 participant