fix(triggers): fix respond-to-ci for CodeQL and review-requested dedup#1034
Merged
zbigniewsobiecki merged 2 commits intodevfrom Mar 24, 2026
Merged
Conversation
Two trigger fixes: 1. check-suite-failure: relax matches() to accept all check_suite failures and add getOpenPRByBranch() fallback when pull_requests[] is empty and head_branch is not a refs/pull/N/head ref. GitHub's CodeQL check suite sends pull_requests: [] with the regular branch name, causing the handler to silently skip all CodeQL failures. 2. review-requested: release the dispatch dedup before claiming so a human explicitly requesting review always succeeds, even if check-suite-success already claimed the PR+SHA dedup key within the 30-min TTL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
respond-to-ci: GitHub's CodeQL check suite sendscheck_suite.completedwithpull_requests: []andhead_branch: "feature/..."(notrefs/pull/N/head). The oldmatches()guard rejected these, so CodeQL failures never triggeredrespond-to-ci. Fix: relaxedmatches()to accept all check_suite failures;handle()now falls back togithubClient.getOpenPRByBranch()when the PR number can't be derived from the payload or ref.review-requested: When CI passes,check-suite-successclaims the PR+SHA dedup key. A subsequent manual review request within the 30-min TTL was silently blocked. Fix:review-requestednow releases the dedup key before claiming it, so a human-initiated review always fires.Root cause evidence
check_suiteevents at ~13:42 UTC (when CodeQL failed on PR docs: add Adding Engines guide and update backends README #1030) as "No trigger matched""Review already dispatched for this PR+SHA, skipping"formongrel-intelligence/cascade:1030:51e254...— set by check-suite-success at 15:36Test plan
respond-to-cifires🤖 Generated with Claude Code