Skip to content

Fall back to HTTP when Apple Git is unavailable#31496

Open
fc-oai wants to merge 1 commit into
mainfrom
fc/avoid-macos-git-installer-plugin-sync
Open

Fall back to HTTP when Apple Git is unavailable#31496
fc-oai wants to merge 1 commit into
mainfrom
fc/avoid-macos-git-installer-plugin-sync

Conversation

@fc-oai

@fc-oai fc-oai commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • resolve the curated plugin sync Git executable without executing it
  • on macOS, treat Apple’s /usr/bin/git shim as unavailable when xcode-select -p reports that developer tools are absent
  • skip directly to the existing GitHub HTTP fallback in that case
  • preserve Git-first sync for Homebrew and other usable Git installations

Root cause

Curated plugin startup sync invokes git ls-remote before its HTTP fallback. On a clean Mac, git resolves to Apple’s /usr/bin/git shim, and executing the shim opens the Xcode Command Line Tools installer before the process can fail and reach HTTP.

This change resolves Git through PATH without executing it. If the selected binary is Apple’s shim and developer tools are unavailable, startup sync marks the Git transport unavailable and enters the existing HTTP fallback immediately.

Eager Git audit

I also audited production Git process spawns in codex-rs.

  • This curated catalog sync is the only default projectless app-server startup path found.
  • Configured Git marketplace auto-upgrade runs Git at plugin startup, but only after a user has explicitly configured a Git marketplace.
  • Experimental Memories has background Git metadata/baseline paths when the feature is enabled.
  • The separate cloud-tasks UI probes Git during environment autodetection.
  • Normal thread/turn Git metadata is gated by filesystem discovery of an existing .git entry.
  • Marketplace add/install, patch apply, doctor, and TUI /diff paths are explicitly user-invoked.

Validation

  • just test -p codex-core-plugins — 313 passed
  • cargo fmt -p codex-core-plugins -- --check
  • git diff --check
  • just bazel-lock-update — succeeded with no lockfile delta
  • just fix -p codex-core-plugins was attempted, but the local shared Rust target exhausted disk before completion; it emitted no source diagnostic

@fc-oai fc-oai marked this pull request as ready for review July 7, 2026 23:09
@fc-oai

fc-oai commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: f3f547c701

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant