Repository navigation
[P1] fix(checks): stop skipped and manual checks reporting as failures - #11700
Conversation
Route every check-classification surface through one shared helper so desktop renderer, desktop main and mobile agree on the same verdict. - GitLab `manual` jobs and pipelines are neutral again, not action_required/failure - `skipped` counts as passed everywhere, including mobile - a neutral check no longer demotes a summary that has passing checks
Greptile SummaryThis PR fixes a set of regressions introduced by #11337 where skipped checks, GitLab
Confidence Score: 5/5Safe to merge; the core classification logic is well-tested across all surfaces and the parity table confirms consistent verdicts. The shared classifyCheckOutcome/summarizeProviderChecks pair is straightforward and its key decisions (skipped=passed, manual=neutral, neutral-can't-demote-green) are each covered by a before-and-after test. The two display-only inconsistencies (a chip label using the old skipped translation key for neutral checks, and startup_failure/error landing in the wrong detail-panel bucket) are cosmetic and do not affect merge-button state or the pill's tone. Files Needing Attention: The neutral-chip label reuse in GitHubItemDialog.tsx and PullRequestPage.tsx, and the incomplete failing-conclusion list in pr-check-counts.ts, are worth a quick follow-up but do not block this fix.
|
| Filename | Overview |
|---|---|
| src/shared/provider-check-summary.ts | New canonical check-classification module; logic for skipped=passed, manual=neutral, neutral-can't-demote-green is clean and well-tested. |
| src/shared/gitlab-pipeline-checks.ts | Correctly splits manual (→ neutral) from action_required (→ action_required), restoring the pre-#11337 intent. |
| src/main/gitlab/mappers.ts | Pipeline-level manual now maps to pending (amber) instead of failure (red); skipped/canceled pipeline tones correctly deferred as product decisions. |
| src/renderer/src/components/pr-check-counts.ts | Shared detail-panel breakdown used by both the PR page and work-item dialog; action_required is kept in its own bucket while skipped moves to passing. Minor: startup_failure/error are not in the local failing set but are in FAILED_CONCLUSIONS, so the pill label and the detail header can disagree for those rare conclusions. |
| src/renderer/src/components/GitHubItemDialog.tsx | Deduplicates getCheckCounts/getChecksSummaryLabel into the shared module; SummaryIcon now keys off counts.passing rather than list.length, fixing the false-green tick. Neutral chip still uses the old skipped translation key rather than the new unresolved one added in en.json. |
| src/renderer/src/components/PullRequestPage.tsx | Identical deduplication to GitHubItemDialog.tsx; same neutral-chip label issue applies here. |
| src/renderer/src/components/right-sidebar/checks-panel-content.tsx | Now uses summarizeProviderChecks for all counts; adds a neutral-state strip and an unresolved chip so the panel header matches the pill for all-neutral check lists. |
| mobile/src/tasks/gitlab-check-summary.ts | Mobile GitLab summary now routes through the shared mappers and summarizeProviderChecks, removing the private copy that kept manual as action_required. |
| src/renderer/src/components/provider-check-classification-parity.test.ts | New cross-surface parity table with 14 cases covering all major check conclusion variants and all desktop summary functions. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Raw check data] --> B[classifyCheckOutcome]
B -->|skipped / success| C[passed]
B -->|failure / timed_out / cancelled / action_required / error / startup_failure| D[failed]
B -->|pending conclusion OR status != completed| E[pending]
B -->|otherwise| F[neutral]
C & D & E & F --> G[summarizeProviderChecks]
G -->|failed > 0| H[state: failure]
G -->|pending > 0| I[state: pending]
G -->|passed > 0| J[state: success]
G -->|total == 0| K[state: none]
G -->|all neutral| L[state: neutral]
H & I & J & K & L --> M[getProviderChecksLabel]
M --> N[Checks pill label + tone]
subgraph Consumers
O[client.ts deriveWorkItemCheckSummary]
P[mappers.ts derivePipelineStatus]
Q[pr-check-status.ts derivePRCheckStatus]
R[task-page-pr-check-summary.ts]
S[mobile github-check-summary.ts]
T[mobile gitlab-check-summary.ts]
end
O & P & Q & R & S & T --> G
subgraph GitLab job mapping
U[mapGitLabPipelineJobStatusToConclusion]
U -->|manual| V[neutral]
U -->|action_required| W[action_required]
end
U --> B
Reviews (9): Last reviewed commit: "fix(checks): stop completed unknown chec..." | Re-trigger Greptile
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change adds shared provider-check classification, aggregation, state resolution, and label formatting. GitHub and GitLab integrations now use the shared utilities. GitLab manual checks map to neutral, while action-required checks remain failures. Mobile and renderer summaries delegate to shared logic. Tests cover provider parity, GitHub rollups, GitLab pipelines, status ordering, pending and failed checks, skipped checks, neutral checks, and empty results. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f417fd1b-29f0-4378-8ca5-63864f769abd
📒 Files selected for processing (14)
mobile/src/tasks/github-check-summary.test.tsmobile/src/tasks/github-check-summary.tsmobile/src/tasks/gitlab-check-summary.tssrc/main/github/client.tssrc/main/gitlab/mappers.test.tssrc/main/gitlab/mappers.tssrc/renderer/src/components/task-page-pr-check-summary.test.tssrc/renderer/src/components/task-page-pr-check-summary.tssrc/shared/gitlab-pipeline-checks.test.tssrc/shared/gitlab-pipeline-checks.tssrc/shared/pr-check-severity-order.test.tssrc/shared/pr-check-status.tssrc/shared/provider-check-summary.test.tssrc/shared/provider-check-summary.ts
…rer project The parity table lived in src/shared but imported a renderer module, and both config/tsconfig.node.json and config/tsconfig.cli.json are composite projects that include src/shared without that renderer path, so `pnpm typecheck` failed with TS6307 on two of its three projects. Only the web project spans both trees. Co-authored-by: Orca <[email protected]>
The checks pill's label, tone and icon all read one ProviderCheckSummary, but getChecksLabel short-circuited on the raw `neutral` counter while the tone and icon key off `state`. After the classification fix a PR with 19 success + 1 neutral renders an emerald CheckCircle2 pill that reads "1 unresolved", and mobile's own label (which keys off `state`) reads "19/20 passed" for the same summary. Move the label into src/shared/provider-check-summary.ts so desktop and mobile cannot fork it again, and key it off `state`. Also covers deriveWorkItemCheckSummary, the desktop-main producer of the summary that reaches the Tasks grid and the relay-paired mobile client. It was rewritten here with no test at all; the parity table stands in derivePRCheckStatusFromRollup, which is a different normalizer. The new main-process test drives getWorkItem with a real statusCheckRollup fixture, pinning the StatusContext `state` fallback that would otherwise be deletable with the whole suite still green. Co-authored-by: Orca <[email protected]>
Review follow-upFixed — CodeRabbit on
|
| jobs | array resolver (before) | every other surface (summarizeProviderChecks) |
|---|---|---|
['manual'] |
success |
neutral |
['success', <unrecognized>] |
neutral |
success |
Rather than add a fourth rule, the array path now maps each job through mapPipelineJobStatusToCheckStatus / ...ToConclusion and hands the result to summarizeProviderChecks, so it is the same code path the renderer, main-process GitHub client and mobile already use. Empty/null input still resolves to neutral (CheckStatus has no none).
Parity is pinned, not just asserted locally: provider-check-classification-parity.test.ts cases now carry the originating GitLab job statuses and additionally assert derivePipelineStatus, so the array rollup is a fourth surface in the same table. New cases: manual-only, manual + green, skipped-only, success + unrecognized status, success + canceled, manual + running. All four new assertions fail on the pre-fix code (verified by reverting mappers.ts and re-running).
One pre-existing assertion changed: mappers.test.ts previously pinned ['success', 'future_status'] -> neutral. That is precisely the rule this PR exists to unify — resolveProviderCheckState says a passing check outweighs an unresolved one — so keeping it would have re-introduced the divergence. It is now split into two named tests: unknown-only still stays neutral, unknown-alongside-passing is success.
Note on blast radius: all three production call sites (src/main/gitlab/client.ts) pass the pipeline-level object/string, never an array, so this is a correctness fix on an exported helper rather than a behaviour change users can see today.
CI: package (windows) — unrelated Windows flake, proven
The verify check is only a rollup gate; the real failure was package (windows) (run 30607549937). Evidence it is flake, not this PR:
- The failure is in the temp-dir cleanup after every assertion passed — the log line immediately before the error is
[packaged-cli-smoke] help and skills commands passed via ...\resources\bin\orca.exe, and theEBUSYis onwin-unpacked\Orca.exe, a binary the smoke test never launches. - An earlier run on this same branch (30606022860, commit 9744c3f) passed
package (windows); the only delta to the failing commit is TypeScript check-classification code and tests, none of it reachable from the packaged-CLI smoke. - Re-running the failed job on the identical commit (
gh run rerun 30607549937 --failed) —package (windows)passed.
Tiny hardening included (separable, CI-only): the smoke script's rm(tempRoot, ...) now uses maxRetries: 20, retryDelay: 250, mirroring src/main/host-tree-removal.ts, which already documents this exact Windows AV/indexer stickiness for product code. A lock that never clears still throws, so a genuine leaked handle keeps failing the gate. Happy to split this out if you would rather keep the PR to check classification.
Deliberately left
classifyPipelineString (the pipeline-level string path) still has its own rules, and two of them differ from the per-check classifier: a skipped pipeline resolves to neutral (a skipped check counts as passed) and a canceled pipeline resolves to neutral (a canceled job counts as failed). Both predate this PR and are unchanged by it. I did not touch them because a whole-pipeline status is a different input space than a check list, and flipping canceled pipelines to red on the MR card is a user-visible tone change that deserves its own PR rather than riding along in a regression fix.
Verification
src/main/gitlab+src/shared+ parity test: 3795 passed / 15 skippedsrc/renderer/src/components+src/main/github: 12080 passedconfig/scripts(covers the two workflow-contract tests that reference the smoke script): 613 passed / 4 skipped- mobile
src/tasks: 175 passed (27 files) tsc -p config/tsconfig.node.jsonand-p config/tsconfig.tc.web.jsonclean;config/tsconfig.tc.web.jsongainedsrc/main/gitlab/mappers.tsin its whitelist, following the existing pattern for pure main-process modules imported by renderer tests.
Review follow-up: all three blocking items addressedPushed 1. GitLab skipped-only pipeline: card vs Checks tab divergence — VALID, fixed at the rootConfirmed. Fixed in the direction you identified as unambiguous: Verified the change is tone-only and cannot turn anything red or unlock a new affordance:
Regression coverage (both fail on
2. Windows EBUSY comment stated a false cause — VALID, comment correctedYou are right and I was wrong. The why-comment in I kept 3. Production string path unpinned — VALID, pinned on both surfacesConfirmed: all three call sites (
SuggestionsTaken: Deliberately deferred, with reasons:
For the PR body / notes, as flagged:
Verification
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/gitlab/mappers.ts (1)
274-309: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd
waiting_for_callbackto the pending pipeline status group.
classifyPipelineStringtreats unknown GitLab pipeline statuses asneutral, sowaiting_for_callbacksurfaces asUnresolvedinstead of pending. Use the same rule aswaiting_for_resourceandscheduled.🩹 Proposed fix
if ( s === 'created' || s === 'pending' || s === 'running' || s === 'waiting_for_resource' || + s === 'waiting_for_callback' || s === 'preparing' || s === 'scheduled' ) { return 'pending' }
🧹 Nitpick comments (1)
src/renderer/src/components/right-sidebar/checks-panel-content.tsx (1)
973-979: 📐 Maintainability & Code Quality | 🔵 TrivialExtend the shared classifier to
failingCountandpendingCountfor consistency.
passingCountnow readsclassifyCheckOutcome, butfailingCount(viaisFailedCheck) andpendingCountstill use separate, file-local rules. All three counts describe the samechecksarray. Keeping three independently maintained classification rules in one component risks reintroducing the exact drift this PR fixes if one rule changes without the others.Consider deriving all three counts from
classifyCheckOutcomeoutcomes (passed,failed,pending,neutral) in a single pass.
[recommended_refactor]
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5c13e88d-69db-43a4-bcfc-588a23a768fe
📥 Commits
Reviewing files that changed from the base of the PR and between 9744c3f and 01887af46b67b5fbd55400be5e12c67ffcc8cf3f.
📒 Files selected for processing (11)
config/scripts/smoke-packaged-cli.mjsconfig/tsconfig.tc.web.jsonmobile/src/tasks/mobile-hosted-check-status.tssrc/main/github/client-work-item-check-summary.test.tssrc/main/gitlab/mappers.test.tssrc/main/gitlab/mappers.tssrc/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/provider-check-classification-parity.test.tssrc/renderer/src/components/right-sidebar/checks-panel-content.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel-content.tsxsrc/shared/provider-check-summary.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/shared/provider-check-summary.ts
|
Follow-up pass on the six blocking items. Five were valid and are fixed; one is factually wrong at the file:line cited, and I've refuted it below (though its underlying concern was real at a different surface, so that got fixed too). Pushed as 1. Sidebar "5 passing" vs the PR page's "2 passing" — VALID, fixed
Both copies now live in Also took the icon suggestion: the summary icon keyed off Pinned by 2. GitLab manual gate — the cited merge-state regression is NOT user-visible; the real one was elsewhere, and is fixedThe specific claim is wrong. But the underlying concern was real at a surface the comment didn't name. Fixed by resolving pipeline-level Job-level 3 / 6.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/renderer/src/components/GitHubItemDialog.tsx (1)
5163-5170: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win"skipped" label no longer matches what
counts.neutralrepresents.This chip renders
counts.neutralunder the text'{{value0}} skipped'.getCheckCountsalready routes checks with a'skipped'conclusion intopassing, socounts.neutralonly holds genuinely neutral checks, never skipped ones. This label misdescribes the count it displays.checks-panel-content.tsxandtask-page-checks-pill.tslabel the same category "unresolved" in this PR. Use consistent wording here too.src/renderer/src/components/PullRequestPage.tsx (1)
5297-5304: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win"skipped" label no longer matches what
counts.neutralrepresents.This chip renders
counts.neutralunder the text'{{value0}} skipped'.getCheckCountsalready routes checks with a'skipped'conclusion intopassing, socounts.neutralonly holds genuinely neutral checks, never skipped ones.checks-panel-content.tsxandtask-page-checks-pill.tslabel the same category "unresolved" in this PR. Use consistent wording here too.
🧹 Nitpick comments (2)
src/renderer/src/components/pr-check-counts.test.ts (1)
50-64: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd coverage for a completed check with no conclusion.
This file has no test for
{status: 'completed', conclusion: null}.checks-panel-content.test.tsxtests this exact shape for the shared classifier path and expects "unresolved". Add a matching case here sogetCheckCounts/getChecksSummaryLabelstay aligned with that behavior.src/renderer/src/components/right-sidebar/checks-panel-content.tsx (1)
1260-1287: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winRow icon still spins for a completed check with no conclusion.
This line falls back
conclusionto'pending'for a null conclusion, without checkingcheck.status. The header directly above (lines 1004-1012) now derives its counts fromsummarizeProviderChecks, which classifies astatus: 'completed',conclusion: nullcheck as'neutral'. This row keeps the old fallback, so its icon still gets the pending color andanimate-spinfor the same check the header now calls "unresolved".This line is unchanged in this diff, so this is a follow-up, not a blocker. Align this fallback with
classifyCheckOutcome(or the correctedgetCheckConclusion, once fixed inpr-check-counts.ts) so the row and the header agree.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ca61765-ea23-4f8e-8cd4-672acebcd239
📥 Commits
Reviewing files that changed from the base of the PR and between 01887af46b67b5fbd55400be5e12c67ffcc8cf3f and dd72c9bfaf8a49044d4a62167704e386d74d328f.
📒 Files selected for processing (16)
config/scripts/smoke-packaged-cli.mjssrc/main/gitlab/mappers.test.tssrc/main/gitlab/mappers.tssrc/renderer/src/components/GitHubItemDialog.tsxsrc/renderer/src/components/PullRequestPage.tsxsrc/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/github-enterprise-slug-routing-boundary.test.tssrc/renderer/src/components/pr-check-counts.test.tssrc/renderer/src/components/pr-check-counts.tssrc/renderer/src/components/provider-check-classification-parity.test.tssrc/renderer/src/components/right-sidebar/checks-panel-content.test.tsxsrc/renderer/src/components/right-sidebar/checks-panel-content.tsxsrc/renderer/src/components/sidebar/worktree-review-helpers.test.tsxsrc/renderer/src/components/task-page-checks-pill.test.tssrc/renderer/src/components/task-page-checks-pill.tssrc/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (4)
- src/renderer/src/components/provider-check-classification-parity.test.ts
- src/main/gitlab/mappers.test.ts
- src/renderer/src/components/TaskPage.tsx
- src/main/gitlab/mappers.ts
dd72c9b to
9744c3f
Compare
Remediation backed out — branch reset to
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/gitlab/mappers.ts (1)
165-198: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDo not let an unknown job override a passed job.
At Line 193,
hasUnknowntakes precedence overhasPassed. A rollup withsuccessandfuture_statusreturnsneutral. Shared aggregation resolves passed and neutral checks tosuccess.Preserve failure and pending precedence. Then return
successwhenhasPassedis true. Unknown-only and manual-only rollups will still returnneutral. Add this combination to the parity cases.Proposed fix
let hasFailure = false let hasPending = false let hasPassed = false - let hasUnknown = false for (const job of rollup) { const s = job.status?.toLowerCase() ?? '' const conclusion = mapPipelineJobStatusToConclusion(s) - // Why: a status this build cannot name is not a green light, even beside a passing job. if (conclusion === null) { - hasUnknown = true continue } @@ - if (hasUnknown) { - return 'neutral' - } // Why: a passing job outranks a neutral one (a manual gate beside a green pipeline is green), but // a pipeline holding nothing but gates is awaiting a human — never report that as passed. return hasPassed ? 'success' : 'neutral'
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a57a0f1a-3c51-4753-b093-62f4dae016ec
📥 Commits
Reviewing files that changed from the base of the PR and between dd72c9bfaf8a49044d4a62167704e386d74d328f and f38f5fe.
📒 Files selected for processing (3)
src/main/gitlab/mappers.test.tssrc/main/gitlab/mappers.tssrc/shared/provider-check-summary.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/gitlab/mappers.test.ts
f38f5fe to
d69d2f4
Compare
Correction: my earlier reset was too aggressiveThe reset I posted earlier reset this branch to its first commit, not its last reviewed-clean one. The original fix round ran 07-30 21:55–23:41; the failed remediation began 07-31 01:18. I used the wrong boundary and dropped 1–2 legitimate commits that were part of the reviewed-clean PR. The branch is now at the correct boundary — the last commit before remediation started. Apologies for the churn; the force-pushes were mine, not a tooling issue. |
…heck classifier The array path in derivePipelineStatus kept its own copy of the rollup rules, so manual-only read green and one unrecognized job status demoted a passing pipeline to neutral — both disagreeing with every other check surface. Also retry the packaged-CLI smoke temp cleanup on Windows: the copied Orca.exe can still be locked by AV/indexers after every assertion passed, failing the package job. Co-authored-by: Orca <[email protected]>
…ks tab - classifyPipelineString now counts a skipped pipeline as passing, matching the per-check classifier; canceled stays neutral and is pinned as an explicit, sign-off-pending divergence. - Pin the production string path (head_pipeline.status) in the parity table and note that the job-array branch has no production caller yet. - Count skipped checks in the Checks panel's passing header so it agrees with the checks pill. - Correct the packaged-CLI smoke retry comment: the EBUSY is the smoke's own just-exited Electron process, not AV/indexers. Co-authored-by: Orca <[email protected]>
…ed MR-card flip
Review follow-ups on the check-classification PR.
- PullRequestPage and GitHubItemDialog kept private copies of getCheckCounts /
getChecksSummaryLabel that still counted only `success` as passing, so a
2-success/3-skipped PR read "2 passing · 3 skipped" there and "5 passing" in
the sidebar. Both copies move to pr-check-counts.ts, which routes the passing
bucket through classifyCheckOutcome; action_required keeps its own amber
bucket. The summary icon now keys off passing count, so an all-neutral PR
stops painting a green tick above "0 of N checks passing".
- The sidebar checks header and triage strip still called
`{status: completed, conclusion: null}` pending, contradicting the grey
"Unresolved checks" pill. Both now read summarizeProviderChecks and render an
unresolved chip/strip instead of an amber spinner that can never resolve.
- classifyPipelineString('skipped') is reverted to neutral. That flip painted
MR cards green for pipelines that never ran, on the only GitLab path with
production callers, and contradicted the same function's deferral of
`canceled`. Both tone changes stay deferred, pinned by one test.
- classifyPipelineString('manual') resolves to pending rather than neutral: a
blocked pipeline is outstanding, and neutral let the worktree card fall
through to its emerald `open` default while GitLab still refuses the merge.
- TaskPage's checks pill helpers move to task-page-checks-pill.ts so the
"1 unresolved on a green pill" fix is actually pinned by a test.
- smoke-packaged-cli no longer lets an EBUSY cleanup replace the real failure.
stablyai#11700) * fix(checks): stop skipped and manual checks reporting as failures Route every check-classification surface through one shared helper so desktop renderer, desktop main and mobile agree on the same verdict. - GitLab `manual` jobs and pipelines are neutral again, not action_required/failure - `skipped` counts as passed everywhere, including mobile - a neutral check no longer demotes a summary that has passing checks * fix(checks): move the check-classification parity test into the renderer project The parity table lived in src/shared but imported a renderer module, and both config/tsconfig.node.json and config/tsconfig.cli.json are composite projects that include src/shared without that renderer path, so `pnpm typecheck` failed with TS6307 on two of its three projects. Only the web project spans both trees. Co-authored-by: Orca <[email protected]> * fix(checks): stop the Tasks-grid pill contradicting its own verdict The checks pill's label, tone and icon all read one ProviderCheckSummary, but getChecksLabel short-circuited on the raw `neutral` counter while the tone and icon key off `state`. After the classification fix a PR with 19 success + 1 neutral renders an emerald CheckCircle2 pill that reads "1 unresolved", and mobile's own label (which keys off `state`) reads "19/20 passed" for the same summary. Move the label into src/shared/provider-check-summary.ts so desktop and mobile cannot fork it again, and key it off `state`. Also covers deriveWorkItemCheckSummary, the desktop-main producer of the summary that reaches the Tasks grid and the relay-paired mobile client. It was rewritten here with no test at all; the parity table stands in derivePRCheckStatusFromRollup, which is a different normalizer. The new main-process test drives getWorkItem with a real statusCheckRollup fixture, pinning the StatusContext `state` fallback that would otherwise be deletable with the whole suite still green. Co-authored-by: Orca <[email protected]> * fix(gitlab): route the pipeline job-array rollup through the shared check classifier The array path in derivePipelineStatus kept its own copy of the rollup rules, so manual-only read green and one unrecognized job status demoted a passing pipeline to neutral — both disagreeing with every other check surface. Also retry the packaged-CLI smoke temp cleanup on Windows: the copied Orca.exe can still be locked by AV/indexers after every assertion passed, failing the package job. Co-authored-by: Orca <[email protected]> * fix(gitlab): stop the skipped pipeline string diverging from the Checks tab - classifyPipelineString now counts a skipped pipeline as passing, matching the per-check classifier; canceled stays neutral and is pinned as an explicit, sign-off-pending divergence. - Pin the production string path (head_pipeline.status) in the parity table and note that the job-array branch has no production caller yet. - Count skipped checks in the Checks panel's passing header so it agrees with the checks pill. - Correct the packaged-CLI smoke retry comment: the EBUSY is the smoke's own just-exited Electron process, not AV/indexers. Co-authored-by: Orca <[email protected]> * fix(checks): finish cross-surface check parity and back out the skipped MR-card flip Review follow-ups on the check-classification PR. - PullRequestPage and GitHubItemDialog kept private copies of getCheckCounts / getChecksSummaryLabel that still counted only `success` as passing, so a 2-success/3-skipped PR read "2 passing · 3 skipped" there and "5 passing" in the sidebar. Both copies move to pr-check-counts.ts, which routes the passing bucket through classifyCheckOutcome; action_required keeps its own amber bucket. The summary icon now keys off passing count, so an all-neutral PR stops painting a green tick above "0 of N checks passing". - The sidebar checks header and triage strip still called `{status: completed, conclusion: null}` pending, contradicting the grey "Unresolved checks" pill. Both now read summarizeProviderChecks and render an unresolved chip/strip instead of an amber spinner that can never resolve. - classifyPipelineString('skipped') is reverted to neutral. That flip painted MR cards green for pipelines that never ran, on the only GitLab path with production callers, and contradicted the same function's deferral of `canceled`. Both tone changes stay deferred, pinned by one test. - classifyPipelineString('manual') resolves to pending rather than neutral: a blocked pipeline is outstanding, and neutral let the worktree card fall through to its emerald `open` default while GitLab still refuses the merge. - TaskPage's checks pill helpers move to task-page-checks-pill.ts so the "1 unresolved on a green pill" fix is actually pinned by a test. - smoke-packaged-cli no longer lets an EBUSY cleanup replace the real failure. * fix(checks): stop completed unknown checks from spinning --------- Co-authored-by: Orca <[email protected]>
ELI5
Imagine a checklist on your pull request. Some items say "passed", some say "skipped, not needed here", and on GitLab some say "waiting for a human to click Deploy". Recently Orca started reading two of those as "broken".
This PR gives all three surfaces (desktop sidebar, desktop Tasks grid, mobile) one shared rulebook: skipped means passed, a GitLab manual gate means waiting-on-a-human, and one neutral item can't outvote the checks that actually passed.
Summary
src/shared/provider-check-summary.ts:21— a singleclassifyCheckOutcome/summarizeProviderCheckspair that is now the only place a provider conclusion becomes passed/failed/pending/neutral.skippedis bucketed withsuccess;action_requiredstays a failure.src/shared/provider-check-summary.ts:39—resolveProviderCheckStaterankspassed > 0aboveneutral > 0, so one neutral (or unknown) conclusion can no longer demote a PR that has passing checks. Fixes the Tasks-grid Merge button (github-pr-merge-state.ts:50checksPassed) and the sidebar checks dot (activity-bar-buttons.tsx:58, which hides on'neutral').src/shared/gitlab-pipeline-checks.ts:38— GitLabmanualmaps back toneutralinstead ofaction_required, restoring the intent (and comment) that fix(checks): rank successful checks above skipped and neutral #11337 deleted;action_requiredkeeps its own branch.src/main/gitlab/mappers.ts:292gets the same treatment for pipeline-levelhead_pipeline.status, so a blocked pipeline no longer paints the worktree card red.mobile/src/tasks/github-check-summary.ts:13andmobile/src/tasks/gitlab-check-summary.ts:10now delegate to the shared helper (and to the shared GitLab job mappers) instead of keeping a third divergent copy of the rules.src/shared/pr-check-status.ts:6,src/renderer/src/components/task-page-pr-check-summary.ts:5andsrc/main/github/client.ts:659(deriveWorkItemCheckSummary) all re-express themselves in terms of the shared helper, sochecksStatusandchecksSummarycan no longer disagree about the same PR.src/shared/provider-check-summary.ts:84—getProviderChecksLabelis now the single checks-pill label, keyed offstaterather than the rawneutralcounter, withTaskPage.tsx:2016andmobile/src/tasks/mobile-hosted-check-status.ts:42both delegating to it. This keeps the label consistent with the correctedstateon every surface: now that one neutral check no longer demotes an otherwise-green summary, a label derived from the rawneutralcounter would still have said "1 unresolved" for a PR whose state issuccess. Deriving it fromstateremoves that second source of truth.src/shared/pr-check-severity-order.tsstill ranks successful checks above skipped/neutral in the checks list ordering. This change is about classification, not ordering.Regression source
All four regressions were introduced by #11337 (
6f3845baa4) — "fix(checks): rank successful checks above skipped and neutral". Alongside its ordering change it reclassified GitLabmanualasaction_required, added neutral buckets that demote a whole summary, and made mobile countskippedas unresolved.Not #11071 (
554892b184, "fix(github): classify all blocking check conclusions"). An earlier draft of this PR body named it as a contributing cause; that was wrong on two counts, and the correction is recorded here rather than silently dropped:git merge-base --is-ancestor 6f3845baa4 554892b184succeeds), so fix(github): classify blocking check conclusions #11071 cannot have established a path fix(checks): rank successful checks above skipped and neutral #11337 fell into.src/shared/pr-check-status.ts(+6/−2) plus its test, mappingerrorandstartup_failureconclusions tofailure. It never touchedgitlab-pipeline-checks.ts,mobile/src/tasks/github-check-summary.ts, ortask-page-pr-check-summary.ts, and it did not introduce theaction_required-is-blocking treatment.Test plan
src/renderer/src/components/provider-check-classification-parity.test.ts: table-driven parity across the desktop surfaces (summarizeProviderChecks,deriveTaskPagePRCheckSummary,derivePRCheckStatus,derivePRCheckStatusFromRollup) for all success; success+skipped; all skipped; success+neutral; all neutral; success+failure; success+running; GitLab manual-only; GitLab manual+success; genuineaction_required.mobile/src/tasks/github-check-summary.test.ts: same table asserted againstbuildGitHubCheckSummary/buildGitLabCheckSummaryand pinned to the shared classifier.origin/main(shared test module kept),npx vitest run --config config/vitest.config.ts src/renderer/src/components/provider-check-classification-parity.test.tsfails 4/10 —'all skipped' resolves identically on every desktop surface→AssertionError: expected 'neutral' to be 'success''GitLab manual gate only' ...→expected { state: 'failure', total: 1, ... } to deeply equal { state: 'neutral', passed: +0, ... }'GitLab manual gate alongside a green pipeline' ...→expected { state: 'failure', total: 2, ... } to deeply equal { state: 'success', passed: 1, ... }'success plus neutral' ...→expected { state: 'neutral', total: 2, ... } to deeply equal { state: 'success', passed: 1, ... }and the mobile file fails 7 tests, including
'success plus skipped' matches the shared desktop classifier→expected { state: 'neutral', ... } to deeply equal { state: 'success', passed: 2, ... }. Both pass after restoring the fix.src/main/github/client-work-item-check-summary.test.ts: drivesgetWorkItem(..., 'pr', ...)with realstatusCheckRollupfixtures soderiveWorkItemCheckSummary— the desktop-main producer of thechecksSummarythat reaches the Tasks grid and the relay-paired mobile client — is covered directly rather than by proxy throughderivePRCheckStatusFromRollup(a different normalizer). Asserts a CheckRunSKIPPED+ StatusContextSUCCESS+ CheckRunNEUTRALrollup resolves to{state:'success', total:3, passed:2, neutral:1}, plus a pending, a failing and an empty rollup. Confirmed failing-then-passing: deleting the?? raw.stateStatusContext fallback fails the first case (expected 'success' to be 'pending') and nothing else in the suite notices.getProviderChecksLabelfor every row: only a'neutral'state may produce an "Unresolved" label, plus an explicit 19-success + 1-neutral case:stateissuccessafter this change, so the label must read19/20 passedrather than "1 unresolved".src/main/gitlab/mappers.test.ts,src/shared/gitlab-pipeline-checks.test.ts,src/renderer/src/components/task-page-pr-check-summary.test.ts,src/shared/pr-check-severity-order.test.ts); each was confirmed failing against the unfixed code first, e.g.mapPipelineJobStatusToConclusion('manual')→expected 'action_required' to be 'neutral'.npx vitest run --config config/vitest.config.ts→ 3975 files passed, 42085 tests passed; the only failures are the 2 knownGIT_CONFIG_COUNTenvironment assertions insrc/relay/agent-exec-handler.test.ts.mobile/src/taskspass.npx oxlinton every changed file: clean. All threepnpm typecheckprojects (config/tsconfig.node.json,config/tsconfig.tc.cli.json,config/tsconfig.tc.web.json) are clean. The parity table lives in the renderer tree rather thansrc/sharedbecause the node and cli projects arecompositeand includesrc/sharedwithout the renderer components directory, so a shared test importingtask-page-pr-check-summaryfails them with TS6307.Found by the production release scan of v1.4.163-rc.0..origin/main.
Made with Orca 🐋
Review follow-up (
dd72c9bfaf) — user-visible tone changes, disclosedTwo GitLab presentation changes ship here and are worth calling out explicitly, because both alter what a user sees on a card they did not previously have to think about.
1. A
manual(blocked) GitLab pipeline now reads amber "pending" instead of red "failed".GitLab reports pipeline-level
manualonly when the pipeline is genuinely blocked on a human trigger (a manual job withallow_failure: false); optionalwhen: manualdeploy buttons leave the pipeline atsuccess. Before this PR that blocked state resolved tofailure, so the worktree card's MR icon was rose andReviewChecksBadgeread "Checks: Failed" for a pipeline that had not failed. It is nowpending: amber icon, "Checks: Pending" badge. Nothing is gated on the value — the merge button's enabled state and label are unchanged (HostedReviewActions.tsx:147-149reads the merge-method label wheneverdirectMergeAvailable, which GitLab always setstruefor an open non-conflicting MR).Resolving it to
neutralwas considered and rejected:worktree-review-helpers.tsx:35-41givesneutralno check tone and then falls through to the emeraldopendefault, so a blocked MR would have rendered identically to a passing one, withReviewChecksBadgesuppressed entirely — a false green in place of a false red.2. The per-job "Action required" cue for GitLab
manualjobs is dropped.mapGitLabPipelineJobStatusToConclusion('manual')moves fromaction_requiredtoneutral, so in the Checks tab a manual job's row goes from an amberAlertTriangle+ "Action required" + "Needs a manual action … to unblock merging" to a greyCircleDashed+ "Neutral". This is deliberate. A job'smanualstatus cannot distinguish a blocking gate from an optional deploy button, andaction_requiredis inFAILED_CONCLUSIONS— which is precisely why a green pipeline carrying one optional manual job rolled up tofailureand painted the whole MR red. Recovering the cue without the false red requires a first-classmanualconclusion inPRCheckDetail, plumbed through every check surface; that is a separate change.Explicitly not changed:
classifyPipelineStringstill resolves bothskippedandcanceledpipelines toneutral, even though the job rollup calls the same jobs passing and failing respectively. GitLab's own MR widget paints both grey, andallow_merge_on_skipped_pipelinedefaults tofalse, so a skipped pipeline still blocks merging — painting that card green would be the optimistic direction. Both string-vs-array divergences are pinned by a test so neither can flip silently, and both remain product decisions for their own PR.