Repository navigation
fix: treat ACTION_REQUIRED/STARTUP_FAILURE/ERROR checks as failing in deriveCheckStatus - #4605
Closed
Mubashirrrr wants to merge 1 commit into
Closed
Mubashirrrr wants to merge 1 commit into
Mubashirrrr wants to merge 1 commit into
Conversation
… deriveCheckStatus deriveCheckStatus classifies a PR's statusCheckRollup into the CheckStatus shown by the right-sidebar "checks" indicator (PRInfo.checksStatus). Its failing-conclusion set was narrower than the repo's own canonical classifier, deriveWorkItemCheckSummary in client.ts, which counts FAILURE, ERROR, TIMED_OUT, CANCELLED, ACTION_REQUIRED and STARTUP_FAILURE as failures. Because deriveCheckStatus omitted ACTION_REQUIRED, STARTUP_FAILURE and the ERROR conclusion, a PR whose only non-passing check reported one of those conclusions fell through to "success" and rendered a green check indicator, even though the check had not passed. The two surfaces disagreed about the same rollup data. Add the three missing failing conclusions so deriveCheckStatus matches deriveWorkItemCheckSummary. Adds mappers.test.ts covering the previously mis-classified conclusions (these assertions fail before the change and pass after) plus passing/pending/empty baselines. Co-Authored-By: Claude Opus 4.8 <[email protected]>
4 of 5 tasks
Contributor
|
Superseded by #11071, which has now merged the fix against the current shared check-status classifier. Mubashir Rahim is credited as a co-author in the merged commit. Thank you for the original diagnosis and implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
deriveCheckStatus(src/main/github/mappers.ts) classifies a PR'sstatusCheckRollupinto theCheckStatusthat drives the right-sidebar checks indicator (PRInfo.checksStatus). For a PR whose only non-passing check reported a conclusion ofACTION_REQUIRED,STARTUP_FAILURE, orERROR, it returnedsuccess— rendering a green check indicator even though the check had not passed.This also makes two surfaces disagree about the same rollup data:
deriveWorkItemCheckSummary(src/main/github/client.ts) already counts those conclusions as failures, so the work-item summary showsfailurewhile the PR card showssuccess.Root cause
deriveCheckStatusonly treatedconclusion ∈ {FAILURE, TIMED_OUT, CANCELLED}(orstate ∈ {FAILURE, ERROR}) as failing. GitHub check runs also reportACTION_REQUIREDandSTARTUP_FAILUREconclusions, and commit statuses can report anERRORconclusion — all failing/blocking. The repo's own canonical classifierderiveWorkItemCheckSummaryalready lists['FAILURE', 'ERROR', 'TIMED_OUT', 'CANCELLED', 'ACTION_REQUIRED', 'STARTUP_FAILURE'];deriveCheckStatushad drifted from it.Fix
Add the three missing failing conclusions (
ERROR,ACTION_REQUIRED,STARTUP_FAILURE) toderiveCheckStatusso it matchesderiveWorkItemCheckSummary. The change is limited to the failing-conclusion condition; passing/pending behaviour is unchanged.Test
Adds
src/main/github/mappers.test.tscovering the previously mis-classified conclusions plus passing/pending/empty baselines. Run with the repo runner:ACTION_REQUIRED,STARTUP_FAILURE,ERROR, and mixed-conclusion cases fail (expected 'success' to be 'failure').client-pr-checks,client-pr-check-details,client-work-items) — 30 tests — remain green.Repro
ACTION_REQUIRED(e.g. a GitHub App requesting action) orSTARTUP_FAILURE.ELI5
PR checks with ACTION_REQUIRED, STARTUP_FAILURE, or ERROR could still show a green success indicator. Those conclusions now count as failing.