notes

Why the empty diff job fails: 609 failures in 14 days, sorted

Name: provisional, minted 2026-10-31 (UTC) by lane maintainer/empty-diff-failures-sorted.

Part of the notes on running the tree. This note answers the question in the proposal find-why-the-empty-diff-job-fails-first (pull request #2968). It changes no workflow. The job is .github/workflows/empty-diff.yml and the script it runs is helpers/empty-diff-check.sh, both from milestone 627 (a pull request that changes nothing does not merge).

The answer

The hypothesis holds. Almost every failure is a draft that carries only its claim: commit, and the job fails it as designed. Of 609 failed runs, 577 (95%) are that case on a draft. Nobody waits on one. A person or a lane paid time on about 30 runs (5%), and most of those cost two to three minutes.

What the collection covers

Every run of the empty diff workflow on the pull_request event from 2026-10-17 through 2026-10-31 (UTC). The API stops at 1,000 results per query, so the list came one day at a time. There are 2,552 runs on 697 pull requests. Of these, 1,939 passed, 609 failed, 2 ended cancelled and 2 still ran when the list came. For each failed run the collection fetched its job, its pull request's commits, and the pull request's draft and ready events.

The classes

class runs pull requests
fails by design: claim-only head, pull request was a draft 577 573
claim-only head, pull request already ready 28 26
real empty diff 4 3
cancelled by a label change 0 0
infrastructure 0 0
other 0 0

The four real empty diffs come from three pull requests. Draft #2420 is the falsification: an empty commit without a claim: subject, which shows the check fires. Draft #2719 merged main and left its tree equal to its base. Ready #2618 failed twice because its work had already landed on main, and it closed unmerged.

No failure was a label-change cancellation. The workflow starts on opened, reopened, synchronize and ready for review, so a label never starts it, and its concurrency group never cancels a run in progress. The two cancelled runs were on branches comments/929-kernel-system-call-selftest and comments/929-crates-09. They ran 52 seconds and 5 minutes, so neither is a zero-second cancellation. They are not failures, so the 609 exclude them.

What cost anyone time

A draft nobody was waiting on: 577 runs, 95% of failures. The median wait from that failure to the next passing run was 27 minutes, which is the time the lane spent writing the first real commit. That is the draft being a draft. It is not a hold. Of those 573 pull requests, 539 merged, 23 closed unmerged and 11 never had a later run.

A pull request that was ready: 30 runs (5%) on 27 pull requests.

So the check held a ready pull request for at most a few minutes in about two thirds of its ready failures, and for longer in four. Summed, the class comes to about 12 hours at its widest reading, and the four long cases supply most of that.

What this says about the bottleneck

The 53-of-83 figure in the proposal holds up: here 574 of 697 pull requests (82%) failed empty diff first. It overstates a problem, because those are claim drafts, and the check is right to fail them. They sit before the first real commit, not before the merge queue. In 28 of 2,552 runs (1%) a claim-only head held a ready pull request, and in 2 an empty diff did. This job is not where the 25-minute pre-queue median goes. Measure the pre-queue median from the first ready event, which sets these drafts aside.

Smallest change that removes the cost

Skip the job on drafts, and only there. In .github/workflows/empty-diff.yml, give the job if: github.event_name != 'pull_request' || !github.event.pull_request.draft. A job that its own if skips shows as skipped, and GitHub treats a skipped required check as satisfied.

This does not hide what milestone 627 exists to show. The check still runs on ready_for_review, when a pull request stops being a draft, and on merge_group, the authoritative half. A claim-only pull request can only merge after both. The merged-with-nothing incident behind 627 was a claim pull request that went ready and merged, which both runs still catch. The proposal refused skipping drafts on the worry that it hides the failure. These two runs keep it visible where it matters.

Open questions before a lane makes it:

Leave the 28 ready-before-push cases alone. They cost a median of 2.6 minutes, and the check is doing its job. If they matter, the fix is in the lane's order: push, then gh pr ready.