Repository navigation
fix(review-pr): re-run flaky CI on bot-authored PRs - #1540
Merged
Merged
Conversation
…g silent In run 23107689220, the review bot spent 35 tool calls investigating a macOS flake on bot-authored PR #1538, correctly diagnosed it as transient, but took no action — no re-run, no comment. Someone else eventually re-ran it manually. Add explicit guidance to step 5: when a CI failure is a transient flake, trigger `gh run rerun --failed` rather than just reporting it. For bot PRs, always re-run (no human author to do it). For human PRs, suggest a re-run in a COMMENT review. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Owner
|
I think this is fine but also really important we stamp out flaky tests: the bot can rerun tests if it finds any flakiness on any PR. it must also find the issue where we discuss the flaky test (open or closed) and add a comment (or edit one if there was a recent comment) giving the context around that instance. generally aim for about one comment /day. |
…ng issues Per review feedback: the bot should rerun failed flaky jobs on any PR (not just bot-authored), and also find/update the tracking issue for each flaky test with context (~1 comment/day rate limit). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Collaborator
Author
|
Good call — updated. The bot now:
|
max-sixty
reviewed
Mar 15, 2026
| gh issue view <issue-number> --json comments \ | ||
| --jq '[.comments[] | select(.author.login == "worktrunk-bot")] | last | .createdAt' | ||
| ``` | ||
| Skip the comment if the bot already commented today. |
Owner
There was a problem hiding this comment.
"Edit the existing comment, or skip, if the bot..."
Collaborator
Author
There was a problem hiding this comment.
Good call — updated to edit the existing bot comment (appending new flake instances) instead of posting a new one each time. 8b3b26c
Address review feedback: when reporting flakes to tracking issues, edit the existing bot comment to append new instances rather than posting a new comment each time. This keeps issues tidy. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gh run rerun --failedon any PR (bot or human-authored)Evidence
Run 23107689220 (claude-review on PR #1538,
chore/renovate-20260315):The review bot spent 35 tool calls investigating a macOS
test_switch_with_execute_through_wrapperflake on bot-authored PR #1538. It correctly diagnosed the failure as transient (unrelated to the Rust 1.90→1.94 bump), but then took no action — no re-run, no comment. Someone else eventually triggered attempt 2 manually, which passed.This pattern was also seen in run 23109051326 reviewing PR #1539, where the bot posted a COMMENT about the flake but didn't trigger a re-run.
Root cause: Step 5 of review-pr has no guidance for the "flake detected" case — only "related to PR" (dismiss approval + comment) and "all passed" (done). The bot falls through to silence.
Test plan
gh run rerun --failed🤖 Generated with Claude Code