Before submitting
Area
apps/server
Steps to reproduce
- Use a repo whose workflow runs on both
push and pull_request. Pushing a PR branch then starts two runs of the same job on the same head commit.
- Open the PR and have an agent call
watch_pull_request.
- Let the
pull_request run finish while the push run is still going.
Expected behavior
No "checks passed" wake while a check run on the head commit is still in progress.
Actual behavior
The wake "All 1 check passed on b986356" arrived at 2026-10-08T04:19:04Z. The head commit's rollup held two runs of Checks / check:
| Event |
Started |
Completed |
| pull_request |
04:06:10Z |
04:18:58Z |
| push |
04:06:13Z |
04:23:58Z (in progress at the wake) |
Cause
toCheckEntries (apps/server/src/pullRequest/gitHubPullRequestJson.ts) sets each run's at to realTimestamp(completedAt) ?? realTimestamp(startedAt). dedupeChecks (pullRequestChecks.ts) keys both runs as Checks check and keeps the one with the newest at. The finished run's completion time (04:18:58) beats the running run's start time (04:06:13), so the in-progress run drops out. evaluatePullRequestWatch then sees one passed check and reports it.
The dedupe is right for a re-run replacing an earlier attempt. A push run and a pull_request run on the same commit are two live runs, though, and the watch gate loses one of them.
I reproduced this offline by feeding the two runs above to the real dedupeChecks and evaluatePullRequestWatch: the result is checks-passed, count 1.
Possible fix
Compute the watch gate from the rollup before display dedupe, so any in-progress run of a check holds "passed" back. In a re-run we checked (attempt 1 failed, attempt 2 passed), GitHub's rollup listed only attempt 2, so old failed attempts should not block it. Comparing runs by startedAt alone fixes this timing but still drops an in-progress run that started before a finished one.
Workaround
After a "passed" wake, check gh run list --commit <sha> before merging.
Impact
Minor bug or occasional failure
Version or commit
Seen on a 2026-10-08 nightly; the code involved is unchanged in 0.0.46-nightly.20261008.2819 (5e22256) and on main at a4c9494.
Environment
Windows 11, desktop app (nightly), private GitHub repository with no required checks.
Before submitting
Area
apps/server
Steps to reproduce
pushandpull_request. Pushing a PR branch then starts two runs of the same job on the same head commit.watch_pull_request.pull_requestrun finish while thepushrun is still going.Expected behavior
No "checks passed" wake while a check run on the head commit is still in progress.
Actual behavior
The wake "All 1 check passed on b986356" arrived at 2026-10-08T04:19:04Z. The head commit's rollup held two runs of
Checks / check:Cause
toCheckEntries(apps/server/src/pullRequest/gitHubPullRequestJson.ts) sets each run'sattorealTimestamp(completedAt) ?? realTimestamp(startedAt).dedupeChecks(pullRequestChecks.ts) keys both runs asChecks checkand keeps the one with the newestat. The finished run's completion time (04:18:58) beats the running run's start time (04:06:13), so the in-progress run drops out.evaluatePullRequestWatchthen sees one passed check and reports it.The dedupe is right for a re-run replacing an earlier attempt. A
pushrun and apull_requestrun on the same commit are two live runs, though, and the watch gate loses one of them.I reproduced this offline by feeding the two runs above to the real
dedupeChecksandevaluatePullRequestWatch: the result ischecks-passed, count 1.Possible fix
Compute the watch gate from the rollup before display dedupe, so any in-progress run of a check holds "passed" back. In a re-run we checked (attempt 1 failed, attempt 2 passed), GitHub's rollup listed only attempt 2, so old failed attempts should not block it. Comparing runs by
startedAtalone fixes this timing but still drops an in-progress run that started before a finished one.Workaround
After a "passed" wake, check
gh run list --commit <sha>before merging.Impact
Minor bug or occasional failure
Version or commit
Seen on a 2026-10-08 nightly; the code involved is unchanged in 0.0.46-nightly.20261008.2819 (5e22256) and on main at a4c9494.
Environment
Windows 11, desktop app (nightly), private GitHub repository with no required checks.