Symptom
Fido marks a PR ready-for-review and requests review from the human while required CI checks are still in progress — the human gets a review notification before there's anything verifiable to review.
Concrete repro on rhencke/orly PR #6:
isDraft: false, review requested from rhencke
- The single
verify check is status: IN_PROGRESS (Coq build takes 10-15 min on cold cache)
If CI ends up failing, the human now has to either ignore the request (noisy) or close the loop manually.
Expected behaviour
The promote-from-draft path already gates on CI green (#465 / #486). But there are two distinct gates:
pr_ready — flips draft → ready
add_pr_reviewers — requests review
Right now both fire together once tasks complete + CI green is observed, but they fire on a single CI snapshot. With long-running checks, the second-to-last task can complete and trigger this pair while a fresh CI run kicked off by the most recent push is still in flight. Fido then promotes + requests review on a PR whose CI is mid-flight (not yet failed, not yet green).
Fix direction
Tighten the gate. Before add_pr_reviewers:
- Re-fetch CI status — must include the latest workflow run on the head SHA, with conclusion=success.
- If any required check is
status=in_progress or status=queued, defer the review-request. Worker can either:
- Wait: poll until checks finish, then promote / request review (or close as failed).
- Skip and re-check on next webhook: don't request review now; let the
check_run completion webhook re-trigger handle_promote_merge once CI lands.
#2 is cleaner — kennel already wakes the worker on check_run completion via waking worker thread, so the next pass naturally picks up the now-final state.
Related
Symptom
Fido marks a PR ready-for-review and requests review from the human while required CI checks are still in progress — the human gets a review notification before there's anything verifiable to review.
Concrete repro on rhencke/orly PR #6:
isDraft: false, review requested from rhenckeverifycheck isstatus: IN_PROGRESS(Coq build takes 10-15 min on cold cache)If CI ends up failing, the human now has to either ignore the request (noisy) or close the loop manually.
Expected behaviour
The promote-from-draft path already gates on CI green (#465 / #486). But there are two distinct gates:
pr_ready— flips draft → readyadd_pr_reviewers— requests reviewRight now both fire together once tasks complete + CI green is observed, but they fire on a single CI snapshot. With long-running checks, the second-to-last task can complete and trigger this pair while a fresh CI run kicked off by the most recent push is still in flight. Fido then promotes + requests review on a PR whose CI is mid-flight (not yet failed, not yet green).
Fix direction
Tighten the gate. Before
add_pr_reviewers:status=in_progressorstatus=queued, defer the review-request. Worker can either:check_runcompletion webhook re-triggerhandle_promote_mergeonce CI lands.#2 is cleaner — kennel already wakes the worker on check_run completion via
waking worker thread, so the next pass naturally picks up the now-final state.Related