Fix the auto-evaluation triggering in pr review agentic workflows#728
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the PR-triage worker’s “evaluation already ran” gate so it doesn’t get tripped by placeholder evaluation.yml runs that only post an initial evaluation-status commit status, allowing the evaluate-now label to be applied and the label-driven evaluation entry point to fire.
Changes:
- Update
.github/scripts/pr-triage-act.shto count only evaluation workflow runs that represent real evaluation triggers (vs status-only placeholder runs). - Switch the workflow-run query to a paginated scan with a
jqfilter over event types/conclusions.
Show a summary per file
| File | Description |
|---|---|
| .github/scripts/pr-triage-act.sh | Refines the “evaluation run exists” detection logic used by the triage worker before applying evaluate-now. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
Evangelink
approved these changes
Jun 5, 2026
Contributor
|
👋 @JanKrivanek — this PR has 1 unresolved review thread(s). When you're ready, please address the feedback and push an update; the triage bot will pick up the next state automatically. (Add the |
…nclusion Fork PRs' fork-pr-status placeholder run is pull_request_target with conclusion=success, so the previous event/conclusion filter still counted it as a real evaluation and suppressed the evaluate-now label. Inspect each run's jobs and treat a run as a real evaluation only when its gate or discover job is non-skipped. Addresses Copilot review feedback on PR #728.
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.
Fix: pr-triage worker no longer skips
evaluate-nowdue to placeholderpr-statusrunsSymptom. PRs were correctly classified as
ready-for-evaland labeledpr-state/ready-for-eval, but theevaluate-nowlabel was never applied, soevaluation.yml's label-driven entry point never fired. Repro on #703 (heada8bb6fc) and #720 (head638726129): every hourly worker run loggedeval-trigger: a workflow run already exists for <sha> — skipping.Root cause.
eval_run_exists_for_head()in.github/scripts/pr-triage-act.shcounted everyevaluation.ymlrun for the head SHA. Butevaluation.ymlalways posts apr-statusrun (event=pull_request) on each push just to set the initial commit status — that run is not a real evaluation trigger. Its presence made the gate think evaluation had already run, so the worker skipped applyingevaluate-now.Fix. Filter the runs query to only events that actually trigger evaluation:
issue_comment(/evaluate)workflow_dispatch(manual)pull_request_targetwithconclusion != "skipped"(the label-drivengatejob runs; the status-only fork variant endsskipped)Verification.
a8bb6fc,638726129): filtered count =0→ worker will now applyevaluate-now./evaluaterun (01050ea83): filtered count =5→ gate still suppresses re-trigger as intended.Unsticking existing PRs. This change ships in
main, but worker checkouts already use the default branch, so the next hourly batch (cron:17) will fire evaluation on all currently-stuckpr-state/ready-for-evalPRs automatically. No manual label nudge required.