Uh oh!
There was an error while loading. Please reload this page.
ci(bugbot): skip bot-authored PRs in bugbot-gate-caller (backend#2647) - #146
Conversation
Bugbot never reviews Dependabot PRs and does not re-review release-train promotion PRs, so the caller polled the callee's wait-seconds and left the advisory bugbot / review check red forever with no route to a verdict. Add an if: to the bugbot job skipping Dependabot (user.type == Bot) and release-train/* promotion branches. The check is advisory, so a skipped caller job (no bugbot / review context) blocks nothing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
saadqbal
left a comment
There was a problem hiding this comment.
I contributed the bot-author measurement this rests on, and then had to correct it, so the distinction here is worth spelling out because you got it right and it would have been easy not to.
The forward claim — bot-authored PRs never get a Bugbot verdict — is the one that survived. What did not survive is its converse: .github#356 measured 6 of 9 human-authored PRs getting no check at all, and backend#2114 closed with "no discriminator survives the data". So "Bugbot reviews human PRs" is false, and any skip justified by author type alone would be resting on that.
This doesn't. Promotions are identified by head_ref, explicitly because their author is human — "authored by a HUMAN (LukasWodka — user.type is 'User', so the head_ref, not the author…)". That's the correct discriminator for that class, and it means the two skips have two independent justifications rather than one over-general one.
The safety argument is the part I'd have probed and it's already exact.bugbot / review is advisory, so an absent check blocks nothing — and then: "If step 3 ever arms this context as required, that follow-up must make the skip terminate in success (an absent required check would park the PR at 'Expected — waiting for status')." That's the required-check trap this org has hit six times in a week, anticipated as a precondition on future work rather than discovered by it. Recording the constraint that would make today's safe change unsafe is the whole difference between a fix and a trap laid for someone else.
Verified the expression is safe given the trigger: the workflow is pull_request:-only, so github.event.pull_request.user.type and github.head_ref are both always populated — no empty-head_ref path where !startsWith('', 'release-train/') would let the job run by accident.
Keeping hotfix/* unskipped is the right narrowing, and the criterion is the right one: "human-authored real code that Bugbot does review… and they are not a class that hangs." The skip is scoped to classes that cannot converge, not classes that are inconvenient — which is what stops this becoming a general-purpose way to silence the gate.
Class fix across docs, backend, model-zoo and tracebloc-engine in sibling PRs. Green, no threads. 👍
Uh oh!
There was an error while loading. Please reload this page.
What
The
bugbotjob in.github/workflows/bugbot-gate-caller.ymlhad noif:guard, so it ran on PRs Bugbot never produces a verdict for. On those PRs the reusable callee just polls untilwait-secondsand the advisorybugbot / reviewcheck stays red forever with no route to green.Add an
if:that skips the two measured classes:user.type == 'Bot') — the learned Bugbot rule "bugbot-gate-caller must skip bot-authored PRs".release-train/to-staging/to-main. These are authored by a human (LukasWodka,user.type == 'User'), so thehead_ref— not the author — is what identifies them. Their commits already passed Bugbot on the source PR; Bugbot does not re-review.Why this is safe
bugbot / reviewis advisory, not a required status context (per this caller's own header: step 3 is deliberately not taken). A skipped caller job emits nobugbot / reviewcheck, and an absent advisory check blocks nothing — so a Dependabot / promotion PR no longer hangs on a never-arriving verdict. If step 3 ever arms this context as required, that follow-up must make the skip terminate in success (an absent required check would park the PR at "Expected — waiting for status").Not skipped: hotfix branches
hotfix/*PRs (e.g. backend#778/#779) are human-authored real code that Bugbot does review, so they are deliberately not skipped — suppressing that advice would lose a genuine verdict, and they are not a class that hangs.Class, not instance
bugbot-gate-caller.ymlexists in docs, backend, model-zoo and tracebloc-engine; all four had the same gap and are fixed in sibling PRs.Evidence
python3 -c "import yaml; yaml.safe_load(open(...))"→ passes on the edited file.pull_requestonly, sogithub.event.pull_requestandgithub.head_refare always in context.Closes tracebloc/backend#2647
🤖 Generated with Claude Code
Note
Low Risk
Workflow-only change to an advisory CI job; no application code, auth, or data paths. Main follow-up risk is future branch-protection arming without changing skip semantics.
Overview
Adds an
if:guard on thebugbotjob so it no longer invokes the reusablebugbot-gateworkflow for PRs where Cursor Bugbot never posts a verdict. Those runs previously polled until timeout and left the advisorybugbot / reviewcheck stuck red with no way to go green.The condition skips bot-authored PRs (
user.type == 'Bot', e.g. Dependabot) and PRs whose head branch starts withrelease-train/(promotion trains whose commits were already reviewed on the source PR). Hotfix and other human-authored branches are not skipped so real Bugbot feedback still runs.Inline comments document why skipping is safe today because the check is advisory, and note that if
bugbot / reviewbecomes a required context, skipped jobs must end in success rather than absent status.Reviewed by Cursor Bugbot for commit 192f8a1. Bugbot is set up for automated code reviews on this repo. Configure here.