Skip to content

fix(source-control): support custom CLI paths - #9632

Closed
jelenv wants to merge 2 commits into
pingdotgg:mainfrom
jelenv:fix/source-control-cli-paths
Closed

jelenv wants to merge 2 commits into
pingdotgg:mainfrom
jelenv:fix/source-control-cli-paths

Conversation

@jelenv

@jelenv jelenv commented Sep 4, 2026 •

Copy link
Copy Markdown

Source-control integrations currently spawn gh, glab, and az by command name. When these tools are installed through a version manager or outside the server's inherited PATH, T3 Code reports them as unavailable and cannot run source-control operations.

This adds server-scoped binary path settings for GitHub, GitLab, and Azure DevOps. The configured executable is used consistently for discovery, authentication checks, remote refinement, and provider operations. The Source Control settings page exposes the path in each CLI provider row, while preserving gh, glab, and az as defaults.

Related to #7618.

Verification

  • 83 focused server tests pass
  • Contracts, server, and web typechecks pass
  • Modified-file lint passes

Screenshots

Before

Source Control Providers before custom CLI paths

After

Source Control Providers after custom CLI paths

Assisted by GPT-5.6 Sol via the Codex harness in T3 Code.

Note

Add custom CLI path configuration for source-control providers

  • Adds settings schema, resolver, and UI control for configuring custom executable paths for GitHub, GitLab, and Azure DevOps providers.
  • Updates the CLI factories (AzureDevOpsCli.make, GitHubCli.make, GitLabCli.make) to read the configured path from server settings and pass it to VcsProcess.run.
  • Error schemas and mappers for all three providers are updated to retain and report the configured executable used for the failed invocation.
  • Risk: SourceControlProviderRegistry.makeWithProviders uses the configured executable during discovery; settings-read failures fall back to the default discovery specifications.

Macroscope summarized db14ad9.


Note

Medium Risk
Source-control discovery and all CLI operations now depend on server settings at runtime; settings read failures fall back to default command names, which could mask misconfiguration on constrained deployments.

Overview
Adds server-scoped sourceControlProviders.*.binaryPath settings (defaults gh, glab, az) so GitHub, GitLab, and Azure DevOps integrations can run CLIs installed outside the server’s PATH.

GitHubCli, GitLabCli, and AzureDevOpsCli now resolve the executable from ServerSettingsService on each run and pass that path into process spawn and error context (unavailable messages cite the configured path, not only “on PATH”). SourceControlProviderRegistry applies the same paths to CLI discovery probes and remote refinement via configureDiscoverySpecs.

The Source Control settings UI adds a CLI executable field on each CLI provider row (primary environment only), with trim-on-save and blank → default behavior covered in server settings tests. User docs note setting the path and rescanning when needed.

Reviewed by Cursor Bugbot for commit db14ad9. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 4, 2026
Comment thread apps/server/src/sourceControl/GitLabCli.ts
@jelenv
jelenv marked this pull request as ready for review September 4, 2026 09:19
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds persisted custom CLI-path configuration and threads it through discovery, authentication probes, remote refinement, and source-control operations for three providers. Existing defaults are preserved and tests cover the new paths, but the cross-cutting production behavior and new user-facing capability merit human review.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 1, 2026 — with ChatGPT Codex Connector
@t3dotgg

t3dotgg commented Oct 1, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6 Astra responding on behalf of Theo

We're closing this as part of a cleanup of stale PRs. Thank you for the time and care you put into this contribution.

A local merge check found conflicts in 7 files against the current target branch. The latest implementation commit is from 2026-09-04, and there has been no contribution update in over a week.

At this point, regenerating a focused patch against the current intended base would be easier to review and maintain than updating this PR. We appreciate the work and will keep this thread as a reference. If you revisit it, please check the current direction with us and link the fresh PR back here.

@t3dotgg t3dotgg closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants