Skip to content

fix(ci): the PR gates accept the readable rationale and let the body override a stale branch - #16053

Merged
mrveiss merged 2 commits into
Dev_new_guifrom
issue-16050-pr-gates
Sep 8, 2026
Merged

mrveiss merged 2 commits into
Dev_new_guifrom
issue-16050-pr-gates

Conversation

@mrveiss

@mrveiss mrveiss commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Closes #16050, #16051.

Thinking Path

Two gates in .github/workflows/pr-issue-validation.yml failed PRs today for reasons that were correct about their own rule and wrong about their premise. Both are in one workflow and one script, so they land together as one review pass and one CI run.

#16050 — the batching gate rejects the form people write

check_pr_issue_batching.py required Single-issue rationale: with the reason on the same line. A markdown heading with the reason beneath matched nothing.

Two independent sessions hit it within four hours — #16018, and #16049 which is the CRITICAL auth fix for #16040. Two authors independently choosing a form the checker rejects is the checker's defect, and the rejected form is the better one: it matches the section style the rest of the body already uses (## Thinking Path, ## What Changed, ## Verification).

The hint taught the failing shape. It printed the inline form indented, as an example, which reads as illustration rather than exact-match.

#16051 — the issue-link gate trusts a name that cannot be corrected

The gate derives the expected issue from the branch name. Two sessions reserved number 16040 six minutes apart; the loser's branch was already issue-16040-*, and the number went to a CRITICAL auth issue. They rewrote their commits to the right number — and the gate then failed the PR for not referencing the wrong one, instructing them in its own error message to add it back.

A gate whose remediation re-creates the defect is worse than no gate. And there is no in-place fix: GitHub does not allow changing a PR's head branch.

The decision was already made — #14241 accepts the body over the branch, and scoped it to forks on the reasoning that an outside contributor cannot be asked to rename. An internal author cannot either. The fork restriction drew the line at who could rename; the answer is nobody.

What Changed

  • check_pr_issue_batching.py accepts ## Single-issue rationale with prose beneath, scanning past blank lines and stopping at the next heading. The hint now names both forms.
  • pr-issue-validation.yml drops PR_IS_FORK from the body-over-branch escape, and its failure message now calls the branch-derived number a guess, telling the author an explicit Closes #<real issue> overrides it.

Verification

31 tests pass. The two that matter are contrasts, because both changes are widenings and the cheap wrong version of each is to widen too far:

case result
heading with prose beneath accepted
reason several blank lines down accepted
heading with nothing under it rejected
heading immediately followed by ## What Changed rejected — does not borrow the next section
heading at end of body rejected
inline form, blank after colon still rejected

The empty-section case is the load-bearing one. This gate asks whether a human justified standing alone; a fix that matches the heading and stops looking turns it into a keyword check that any PR passes with an empty heading.

The escape's regex was exercised directly:

body escape fires?
Closes #16046, #16044 (the #16047 case) yes
Refs #16040 only no — not a closing claim
links nothing no
this self-closes #123 no

So it widens who may override the inference, not what counts as one. A PR linking no issue at all still fails.

Model Used

Opus 5

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c4451ef1-625c-4cb9-93fa-ef4f9031b4d4


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.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss
mrveiss merged commit 3fb5a1e into Dev_new_gui Sep 8, 2026
68 checks passed
@mrveiss
mrveiss deleted the issue-16050-pr-gates branch September 8, 2026 12:04
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