GeezerVison is showing github.com — fix(gitlab): name the cause of a failed glab command by Sinan53x · Pull Request #22509 · pingdotgg/t3code
Conversation
Problem
When glab fails, GitLabCliCommandError.detail is the same fixed string for every failure class, so a user behind a broken proxy (or any non-auth, non-rate-limit failure) sees an identical message thousands of times and can't tell T3, glab, or the GitLab server apart. The process boundary already classifies each failure (failureKind, timeout, output limits) — the classification was being discarded. Fixes #22342.
Change
GitLabCliCommandError gains an optional reason field — a bounded set of failure-class tags (not-found, timed-out, output-limit-exceeded, ...) populated in fromVcsError — appended to detail, the string SourceControlProviderError surfaces. The issue suggested putting glab's stderr in the message; this deliberately doesn't, matching the convention from #5620/#8645 — stderr is classified then discarded at the process boundary and never reaches the error. Unclassified exits stay generic rather than claiming a cause. Modeled on #8645's GitCommandError.reason (ForwardCompatibleOptional, tag in parens), adjusted to put the tag in detail since that is what wrappers copy here.
Scope and approval
Fixes #22342 (untriaged, claiming the small-fix exception): one error class in packages/source-control-gitlab, one problem — the discarded classification. Follow-ups intentionally left out: mr view's MR-not-found message can't distinguish a project-level 404 (needs subcommand-aware classification), and PullRequestProviderError.reason could map the new tag.
Verification
New tests in GitLabCli.test.ts; before the fix the not-found assertion fails on the old fixed string. After: vp test run src/server/GitLabCli.test.ts 11/11, vp test run 174/174 package, vp lint/vp fmt --check clean, package typecheck clean on macOS arm64. Not exercised: a real GitLab server or packaged app — covered at the service boundary with the same VcsProcessExitError shapes VcsProcess produces.
SWE-2 Max, Devin CLI
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at f98d0d4
Macroscope's review found this PR approvable — This is a focused GitLab CLI error-reporting fix that preserves existing command behavior while adding bounded failure-reason tags to diagnostics. The production scope is isolated to one error class, with targeted tests and no configuration, deployment, security, billing, or schema-breaking impact.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 20, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Important
Review skipped
Review was skipped as selected files did not have any reviewable changes.
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between fdd200ab4100de0dcc2491e852bc34157b75d8b3 and 53bd547.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between f98d0d43879d91f4749151010d7ef777c13055a3 and eadbaf7bfd72160d826083c1bbb2a866b22c288e.
Files selected for processing: 2
-
packages/source-control-gitlab/src/server/GitLabCli.test.ts
packages/source-control-gitlab/src/server/GitLabCli.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Walkthrough
-
GitLab CLI command errors now support optional failure reasons. VCS failure kinds map to specific reasons, and tests verify classified and unclassified errors.
Changes: GitLab CLI error classification
| Layer / File(s) |
Summary |
Classify GitLab CLI failures packages/source-control-gitlab/src/server/GitLabCli.ts, packages/source-control-gitlab/src/server/GitLabCli.test.ts |
GitLabCliCommandError accepts an optional failure reason and includes it in the detail when present. VCS failures map to specific reasons. Tests cover not-found and timeout classifications, generic command failures, and unclassified exits. |
Priority: Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
Possibly related PRs
- pingdotgg/t3code#23995 — Adds process failure-classification hooks and shared VCS error shapes used by this GitLab CLI mapping.
- pingdotgg/t3code#24464 — Raises the GitLab merge-request list output limit for the failure classified here as
output-limit-exceeded.
- pingdotgg/t3code#24215 — Raises the merge-request list output limit for long descriptions; this PR classifies output-limit failures.
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to eadba
-
Classified GitLab CLI failures reach the provider error message. No actionable merge risk remains beyond normal checks.
Security architecture risk: Minimal · up to f98d0
-
The change exposes only predefined failure categories through an existing error path. It preserves authentication and rate-limit handling and does not add command-execution authority or raw process output to error messages. No material security risk was identified in the changed behavior.
Retained concerns
No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- inferred — The effective exposure change is limited to diagnostic categories reaching consumers of existing GitLab provider errors. The comparison does not introduce a new execution entrypoint, credential capability, or persistent-state transition.
Trust Boundaries and Controls
- observed — Process failures cross the existing provider boundary through fixed error classes and bounded diagnostic tags. Authentication and rate-limit classifications remain distinct, and unsupported reason values decode as absent rather than becoming arbitrary display text.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly and concisely describes the main change: adding failure-cause information to failed GitLab CLI commands. |
| Description check |
 |
The description includes all required sections. It explains the problem, the implementation, the scope exception, the verification results, and the checks that were not run. It also identifies the age… |
| Linked Issues check |
 |
Issue #22342 requires GitLab CLI failures to expose the failure cause instead of one fixed detail. GitLabCliCommandError now maps recognized VcsError classes to bounded reason tags and includes … |
| Out of Scope Changes check |
 |
The whole-PR diff changes GitLabCliCommandError reason mapping and focused GitLabCli tests. The bounded tags, error formatting, and tests directly support issue #22342. No unrelated product behavi… |
Full details: Description check
-
Explanation
The description includes all required sections. It explains the problem, the implementation, the scope exception, the verification results, and the checks that were not run. It also identifies the agent and harness used.
Full details: Linked Issues check
-
Explanation
Issue #22342 requires GitLab CLI failures to expose the failure cause instead of one fixed detail. GitLabCliCommandError now maps recognized VcsError classes to bounded reason tags and includes each tag in detail and message. GitLabCli.test.ts verifies not-found, timed-out, and generic unclassified exits. The issue presents stderr as a suggestion, not a required coding condition. The tests also preserve the separate merge-request not-found behavior.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff changes GitLabCliCommandError reason mapping and focused GitLabCli tests. The bounded tags, error formatting, and tests directly support issue #22342. No unrelated product behavior or follow-up scope appears in the reviewed changes.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 Claude Opus 5.5 responding on behalf of Theo
Closing. This PR has been open for more than 3 weeks, and main has moved a long way since then. If the change still matters, open a fresh PR from current main.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
bugfix
Fix PR opened by an issue lead; enters the PR loop
pr:gate-failed
A land gate failed
size:M
30-99 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
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.
|