Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#17,523 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Mnigos ci sta già lavorando.

Dal 10/10/2026.

  • #17787 di @Mnigos — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, typescript, vite
Ambito
testing

Direzione di ricerca

La correzione è una modifica di configurazione: il vite.config.ts alla radice ha setupFiles senza apps/server/src/testUtils/gitConfig.setup.ts, che apps/server/vite.config.ts carica già. Inizia confrontando i due array setupFiles. Poi riproduci il problema eseguendo apps/server/src/git/GitManager.test.ts dalla radice del repository, con GIT_CONFIG_GLOBAL che punta a una configurazione che imposta commit.gpgsign=true. È completato quando la suite passa senza chiamate a gpg e le altre suite continuano a essere eseguite invariate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
24.8k
Fork
6.4k
Merge medio
10h 41m
PR unite (30g)
352

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pingdotgg/t3code

Tutte le issue di pingdotgg/t3code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.