Skip to content

fix(gates): ignore check suites that never report a run - #347

Merged
artempartos merged 1 commit into
developfrom
artempartos/fix-ci-gates-not
Sep 28, 2026
Merged

artempartos merged 1 commit into
developfrom
artempartos/fix-ci-gates-not

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Problem

Since #309 (on prod since 2026-09-25), the check_suite webhook doesn't resolve a github_checks_completed gate from the webhook's conclusion anymore. It calls the reconciliation probe instead, and the probe waits for every check suite on the PR's head commit.

GitHub opens a check suite for every installed app that has the checks permission, including apps that never report a run. On Collectivelyai/collectively-app, Railway does exactly that. Its suite stays queued with latest_check_runs_count: 0 forever. So every gate logged 1/2 check suites still running on PR #… until its 12h TTL marked it stale.

Prod data for project 27, gates by creation day:

day resolved stale
09-22 … 09-24 75–130/day 0–1
09-25 (deploy) 4 10
09-26 0 21
09-27 0 23
09-28 — 13 pending

Example: PR 1233 (board task 2232). github-actions completed/success with 14 runs, railway-app queued with 0 runs.

Fix

Github::CheckStatusService#pull_request_checks now skips a suite that is not completed and has no check runs, as long as some other suite has runs. GitHub's own PR checks UI hides these empty suites in the same way.

If every suite is still empty, the result is in_progress, not unresolvable. A fresh push looks like that for a few seconds, before Actions attaches its runs.

Known trade-off: an app that reports runs late, after another suite has already finished, could miss the verdict. GitHub has no signal that tells a slow app apart from one that never reports, so this can't be closed completely here.

Verification

  • Contract tests added: an empty suite next to a passing one, an empty suite next to a failing one, and all suites empty.
  • Rubocop is clean locally. The test suite runs on CI.
  • After deploy, the 13 pending gates should resolve on the next reconcile sweep, because they are all within their TTL.

🤖 Generated with Claude Code

GitHub opens a check suite for every installed app with the checks
permission. An app that never reports a run (Railway on
collectively-app) leaves its suite queued with zero runs forever, and
since #309 routed the check_suite webhook through the reconciliation
probe, every github_checks_completed gate on such a repo waited on it
until its TTL marked it stale. No gate in project 27 has resolved since
the 2026-09-25 deploy.

Empty queued suites are now set aside while another suite has runs. A
PR whose suites are all still empty reads as in_progress, because that
is also what a fresh push looks like for a few seconds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit 143b2c8 into develop Sep 28, 2026
7 checks passed
artempartos added a commit that referenced this pull request Nov 24, 2026
…n the Docs portal (#866)

* fix(workflows): list a draft's test runs under the workflow they tried out

Each draft is its own hidden workflow row, so the Sessions & Runs workflow
filter gained one identical "<name> (draft)" entry per draft that had a test
run, and the rows themselves did not say they ran a draft. The filter now
offers the workflow once and takes its drafts' test runs with it, and a
test run's row is named "<name> (draft)". The workflow_id filter of the
personal MCP's list_workflow_runs and list_sessions folds drafts the same way.

Found in UAT (Flow Dev #347).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* docs(workflows): add the drafts section to the Docs portal page

The section went into docs/user-guide only; the in-app /docs portal renders
its own copy, which had no word on drafts, including that a test run is a
real run.

Found in UAT (Flow Dev #346).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

---------

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants