You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop: a check run that failed to start shows the checks summary as pending #8962
A check run that GitHub reports as COMPLETED with conclusion STARTUP_FAILURE is mapped to pending, so the pull request checks summary never leaves the in progress state. The workflow never started, so GitHub and the mobile client both show this check run as a failure. The summary should show failure as well.
Steps to reproduce
Open a pull request whose workflow cannot start, for example a workflow file with an error, so GitHub reports that check run as COMPLETED with conclusion STARTUP_FAILURE.
Open the pull request in the workspace review tab and look at the checks summary.
Expected status for that check: failure. Expected aggregate: failure. Current result is pending for both, so the summary spins until the pull request closes.
Triage: a check run that failed to start (STARTUP_FAILURE) is mapped to pending
Summary. GitHub can report a check run as status: COMPLETED with conclusion: STARTUP_FAILURE. This happens when the workflow never started, for example because the workflow file has an error. The host-service PR mapper has no case for that conclusion. It falls through to pending, so the PR checks summary in the desktop review tab stays "in progress" for good. The mobile client shows the same run as failed, so the two clients disagree. Reading the code confirms the report, and the payload in the issue gives exactly the result described.
Affected code
packages/host-service/src/runtime/pull-requests/utils/pull-request-mappers/pull-request-mappers.ts:156-177 (mapCheckRunStatus): for a completed run, only SUCCESS, FAILURE, TIMED_OUT, ACTION_REQUIRED, CANCELLED, SKIPPED and NEUTRAL have a case. Anything else, including STARTUP_FAILURE, hits default: return "pending" at line 175.
pull-request-mappers.ts:91-104 (computeChecksStatus): one pending check with no failure or cancelled check gives "pending" for the whole PR. That is why the summary keeps spinning.
For comparison, mobile gets this right. apps/mobile/screens/(authenticated)/workspace/[id]/utils/pullRequest/checks.ts:15-32 treats any completed conclusion it does not know as "failed" (default branch). It only treats STALE and null as running.
Root cause
The default branch in mapCheckRunStatus treats every unknown conclusion as "still running". But status === "COMPLETED" has already been checked at that point, so the run is finished. It can never move from pending to anything else. GitHub's CheckConclusionState also includes STARTUP_FAILURE and STALE, and neither has a case.
Related: the legacy desktop gh CLI path has the same gap, and it is worse there
apps/desktop/src/lib/trpc/routers/workspaces/utils/github/types.ts:9-20: the conclusion zod enum does not list STARTUP_FAILURE (or STALE).
pr-resolution.ts:332-337 and :363-367: GHPRResponseSchema.safeParse therefore fails for the whole PR. On the single-PR path it returns null, and on the list path the PR is skipped without a message. The PR does not show at all, which is worse than a wrong check status.
pr-resolution.ts:432-436 and :463-470: even if the schema accepted the value, parseChecks and computeChecksStatus do not list STARTUP_FAILURE either.
Reproduction
Steps from the issue: open a PR whose workflow file is invalid, then open the workspace review tab. Or add this unit test beside the mapper:
import{expect,test}from"bun:test";import{computeChecksStatus,parseCheckContexts}from"./pull-request-mappers";test("STARTUP_FAILURE check run counts as failure",()=>{constchecks=parseCheckContexts([{__typename: "CheckRun",name: "build",status: "COMPLETED",conclusion: "STARTUP_FAILURE",detailsUrl: null}asnever,]);expect(checks[0]?.status).toBe("failure");expect(computeChecksStatus(checks)).toBe("failure");});
With the current code, both assertions get "pending".
Suggested fix
In mapCheckRunStatus, add case "STARTUP_FAILURE": to the failure group.
Match mobile's rule for the remaining cases: once status === "COMPLETED", an unknown conclusion should not stay pending. Map only STALE and null to pending and send other unknown values to failure, so the next conclusion GitHub adds does not bring this bug back.
Legacy desktop path: add "STARTUP_FAILURE" and "STALE" to the zod conclusion enum, or relax it to z.string(), so one new conclusion cannot drop the whole PR. Then add STARTUP_FAILURE to the failure branches in parseChecks and computeChecksStatus.
Activity
github-actions commentedon Oct 27, 2026
Triage: a check run that failed to start (
STARTUP_FAILURE) is mapped topendingSummary. GitHub can report a check run as
status: COMPLETEDwithconclusion: STARTUP_FAILURE. This happens when the workflow never started, for example because the workflow file has an error. The host-service PR mapper has no case for that conclusion. It falls through topending, so the PR checks summary in the desktop review tab stays "in progress" for good. The mobile client shows the same run as failed, so the two clients disagree. Reading the code confirms the report, and the payload in the issue gives exactly the result described.Affected code
packages/host-service/src/runtime/pull-requests/utils/pull-request-mappers/pull-request-mappers.ts:156-177(mapCheckRunStatus): for a completed run, onlySUCCESS,FAILURE,TIMED_OUT,ACTION_REQUIRED,CANCELLED,SKIPPEDandNEUTRALhave a case. Anything else, includingSTARTUP_FAILURE, hitsdefault: return "pending"at line 175.pull-request-mappers.ts:91-104(computeChecksStatus): onependingcheck with no failure or cancelled check gives"pending"for the whole PR. That is why the summary keeps spinning.apps/mobile/screens/(authenticated)/workspace/[id]/utils/pullRequest/checks.ts:15-32treats any completed conclusion it does not know as"failed"(defaultbranch). It only treatsSTALEandnullas running.Root cause
The
defaultbranch inmapCheckRunStatustreats every unknown conclusion as "still running". Butstatus === "COMPLETED"has already been checked at that point, so the run is finished. It can never move frompendingto anything else. GitHub'sCheckConclusionStatealso includesSTARTUP_FAILUREandSTALE, and neither has a case.Related: the legacy desktop
ghCLI path has the same gap, and it is worse thereapps/desktop/src/lib/trpc/routers/workspaces/utils/github/types.ts:9-20: theconclusionzod enum does not listSTARTUP_FAILURE(orSTALE).pr-resolution.ts:332-337and:363-367:GHPRResponseSchema.safeParsetherefore fails for the whole PR. On the single-PR path it returnsnull, and on the list path the PR is skipped without a message. The PR does not show at all, which is worse than a wrong check status.pr-resolution.ts:432-436and:463-470: even if the schema accepted the value,parseChecksandcomputeChecksStatusdo not listSTARTUP_FAILUREeither.Reproduction
Steps from the issue: open a PR whose workflow file is invalid, then open the workspace review tab. Or add this unit test beside the mapper:
With the current code, both assertions get
"pending".Suggested fix
mapCheckRunStatus, addcase "STARTUP_FAILURE":to thefailuregroup.status === "COMPLETED", an unknown conclusion should not staypending. Map onlySTALEandnulltopendingand send other unknown values tofailure, so the next conclusion GitHub adds does not bring this bug back."STARTUP_FAILURE"and"STALE"to the zodconclusionenum, or relax it toz.string(), so one new conclusion cannot drop the whole PR. Then addSTARTUP_FAILUREto the failure branches inparseChecksandcomputeChecksStatus.refactor: share check status mapping between host-service and desktop (…
fix(fork): CPU after hours open, Today reviews, worktree branching an…