Skip to content

Name What Watches the Checks When wait Returns 50 at Once - #3262

Merged
ptr727 merged 2 commits into
developfrom
feature/wait-answered-headline
Oct 20, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/wait-answered-headline

Conversation

@ptr727

@ptr727 ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

pr_review.py wait returns exit 50 within a second on every call on a head whose round opens on an uncounted non-clean verdict, since nothing reads an answer to that headline (#3246). So once the headline is answered, wait cannot be used to wait for checks still running on that head.

  • Where a check on that head has not concluded, wait now prints a note after the 50 status. The note names a bounded timeout 1800 gh pr checks <n> --repo <owner>/<repo> --watch to watch the checks with, then status.
  • The gate is checks_settling, which leaves out a stuck check and reads no branch rules. The local review ruled out held_checks_open, which is about whether a held wait polls on: it fired on a DIRTY, BEHIND, or UNKNOWN merge and on an empty rollup, and it printed an unrelated rules-read note.
  • No new exit code. The scripts/README.md exit-50 paragraph says the same.

Tests cover a running check, which names the watch and fails with the change reverted. They also cover every check passed, a stuck check, and no checks, each naming no watch, and both held_checks_open and a mergeStateStatus != "CLEAN" gate fail them.

Refs #3246

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 20, 2026 06:58
Nothing reads an answer to an uncounted-verdict headline, so wait
returns 50 within a second on every call on that head. Where a check
on the head can still move its merge, wait now says so and names a
bounded gh pr checks --watch to watch it with, so the quick return no
longer reads as a terminal answer.

Refs #3246

Co-Authored-By: Claude Opus 5.5 <[email protected]>
held_checks_open decides whether a held wait polls on, so it also fired
on a DIRTY, BEHIND, or UNKNOWN merge and on an empty rollup, and it
printed the rules-read note under a wait that holds nothing. A check
still settling is the only thing a watch waits for, so the note now
reads checks_settling, and cases with every check passed, stuck, or
absent pin that no watch is named.

Refs #3246

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727 ptr727 added enhancement New feature or request script A defect in hub tooling labels Oct 20, 2026
Copilot AI lite review requested due to automatic review settings October 20, 2026 14:03
@ptr727

ptr727 commented Oct 20, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 20, 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: f12d7404-c314-4a67-8b2b-1a0217228149
  • 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 unresolved issues were identified.

No open issues 🎉

What changed in this PR

Updates pr_review.py wait to explain exit 50 when checks are still settling.

Changes:

  • Adds bounded gh pr checks --watch guidance.
  • Documents the behavior.
  • Adds coverage for running, completed, stuck, and absent checks.
File Description
tests/​test_pr_review.py Tests watch guidance and exclusions.
scripts/​README.md Documents exit-50 behavior.
scripts/​pr_review.py Prints watch guidance for settling checks.

Review effort: Lite

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3262   +/-   ##
==========================================
  Coverage           ?   65.42%           
==========================================
  Files              ?       17           
  Lines              ?     9989           
  Branches           ?        0           
==========================================
  Hits               ?     6535           
  Misses             ?     3454           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 65.42% <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 0bef2da into develop Oct 20, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/wait-answered-headline branch October 20, 2026 14:20
ptr727 added a commit that referenced this pull request Oct 20, 2026
…and File-Naming Check to Main (#3266)

## Summary

Promotes eight pull requests from develop. Three are `pr_review.py`
reader fixes from this round, one answers this promotion's first review,
and four are from other sessions.

- #3261: each heading, thematic-break, and fence shape in `pr_review.py`
has one primitive that every reader composes from. A no-break space
after a heading's hashes no longer opens a heading, and a tab-spaced
thematic break or setext underline closes its block.
- #3262: when `wait` returns `50` at once on an uncounted-verdict head
while a check has not concluded, it names a bounded `gh pr checks
--watch` to watch the checks with.
- #3264: `CODE_SPAN` reads code spans, raw inline HTML, and autolinks
left to right, as GitHub binds them, so a backtick inside an earlier
HTML comment, tag, or autolink opens no span. A line of only blockquote
markers now ends a paragraph.
- #3256: `pr_review.py wait` reads a superseded run's failed aggregator
as superseded rather than as a verdict on the head.
- #3258: a `driftNote` can exempt a tool-fixed script name from the
file-naming check.
- #3253: an audit check for file naming, including secret-file stem
casing.
- #3249: the Linux quick start names the no-sudo Debian case.
- #3267: splits the over-long and two-instruction sentences that this
promotion's first Copilot round found in #3249's paragraph.

Closes #3241
Closes #3246
Closes #3235
Closes #3252
Closes #3254
Closes #3141
Closes #2551

🤖 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

enhancement New feature or request script A defect in hub tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants