Skip to content

fix(server): stabilize non-repository Git diagnostics#4075

Closed
EricTsai83 wants to merge 1 commit into
pingdotgg:mainfrom
EricTsai83:agent/fix-git-locale-detection
Closed

fix(server): stabilize non-repository Git diagnostics#4075
EricTsai83 wants to merge 1 commit into
pingdotgg:mainfrom
EricTsai83:agent/fix-git-locale-detection

Conversation

@EricTsai83

@EricTsai83 EricTsai83 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Use LC_ALL=C only for the two Git commands whose non-repository control flow parses an English diagnostic.
  • Add an integration test that verifies general Git subprocesses continue to preserve a caller-provided locale.

Why

T3 Code identifies a non-repository result by matching Git's English diagnostic text. Git localizes that diagnostic through gettext, while the subprocess previously inherited the host locale. On systems with Git translations installed, a normal non-repository status could therefore be misclassified as a GitCommandError.

Using the C locale at these two call sites makes the parsed diagnostic deterministic without changing locale behavior for unrelated Git operations. LC_ALL is scoped to the commands instead of using only LC_MESSAGES so the fix also works when the host already defines LC_ALL, which takes precedence over individual locale categories.

Validation

  • vp check
  • vp run typecheck
  • vp test apps/server/src/vcs/GitVcsDriverCore.test.ts

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d02f9959-88ab-4a08-894e-a32d32594870

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:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 17, 2026
@EricTsai83
EricTsai83 force-pushed the agent/fix-git-locale-detection branch from 738d87c to a070833 Compare July 17, 2026 07:36
@EricTsai83 EricTsai83 changed the title fix(server): force C locale for Git subprocesses fix(server): stabilize non-repository Git diagnostics Jul 17, 2026
@EricTsai83

Copy link
Copy Markdown
Contributor Author

Superseded by #4077, which uses the replacement fix/git-non-repository-locale branch and centralizes stable diagnostic execution across all three affected command paths. Closing this draft so review stays on the complete replacement.

@EricTsai83 EricTsai83 closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 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.

1 participant