Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Server git tests sign fixture commits with the developer's key when run from the repo root

Đang mở Phù hợp với người mới
#17,523 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Mnigos đang làm issue này rồi.

Từ ngày 10/10/2026.

  • #17787 của @Mnigos — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git, typescript, vite
Lĩnh vực
testing

Hướng nghiên cứu

Bản sửa là một thay đổi cấu hình: setupFiles trong vite.config.ts ở thư mục gốc chưa có apps/server/src/testUtils/gitConfig.setup.ts, trong khi apps/server/vite.config.ts đã tải tệp này. Hãy bắt đầu bằng cách so sánh hai mảng setupFiles. Sau đó tái hiện lỗi bằng cách chạy apps/server/src/git/GitManager.test.ts từ thư mục gốc của repo, với GIT_CONFIG_GLOBAL trỏ tới một cấu hình có commit.gpgsign=true. Việc được coi là xong khi bộ kiểm thử chạy thành công mà không gọi gpg nào, và các bộ kiểm thử khác vẫn chạy như cũ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce
  1. Set commit.gpgsign = true in ~/.gitconfig (any GPG or SSH signer; mine is a YubiKey through gpg-agent).
  2. From the repo root, run a server git suite the way AGENTS.md describes:
    vp test run apps/server/src/git/GitManager.test.ts
Expected behavior

Fixture repositories ignore the developer's signing config. apps/server/src/testUtils/gitConfig.setup.ts exists to pin commit.gpgsign=false and tag.gpgsign=false for exactly this reason.

Actual behavior

Every fixture commit calls gpg. With a hardware key, that's a PIN/touch prompt every few seconds for the whole run. Without a usable signer, most of the suite fails.

The setup file is only registered in apps/server/vite.config.ts (setupFiles). Running from the repo root loads the root vite.config.ts instead, and its setupFiles only contains packages/shared/src/testing/longTempDir.ts. Agents running inside T3 Code run tests from the root, so an agent running server tests on a machine with signing enabled keeps prompting the user.

Measured with GIT_CONFIG_GLOBAL pointing at a config with commit.gpgsign=true and a gpg.program that logs and exits 1:

Tests gpg calls
root config as is 107 failed, 13 passed 107
setup file added to root setupFiles 120 passed 0

Adding ./apps/server/src/testUtils/gitConfig.setup.ts to the root setupFiles fixes it. It only sets GIT_CONFIG_* variables, so other suites are unaffected. Happy to send the 3-line PR.

Impact

Major degradation or frequent failure

Version or commit

101f8b2f55

Environment

macOS 26 (Darwin 25.6), git 2.56, GnuPG (MacGPG2) with a YubiKey

Workaround

Run from apps/server (cd apps/server && vp test run src/git/GitManager.test.ts), or export GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
7 giờ 9 phút
Pull request đã merge (30 ngày)
244

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.