Git/GitHub cleanup: naming collision, sync-block hazard, e2e fixture duplication - #364
Merged
Merged
Conversation
…collision with git's nonInteractiveGitEnv
Olga Lavrichenko (OLavrik)
requested review from
Rustam Sadykov (SBOne-Kenobi),
danyaberezun and
Rinat S (rsolmano)
as code owners
September 1, 2026 01:05
danyaberezun
approved these changes
Sep 1, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small, independent fixes found while auditing how git/GitHub plumbing is used across the codebase.
Resolve a name collision in the git env builders
packages/server/src/pr/pr.ts defined its own nonInteractiveGitEnv(base, hasSshCommandConfig) — a different function, with a different signature, from the git module's barrel-exported nonInteractiveGitEnv()
(packages/server/src/git/gitExec.ts) that pr.ts already imports. Renamed the local one to pushGitEnv to remove the ambiguity.
Move gh auth status off spawnSync onto the shared bounded runner
github.ts's githubAuthStatus() ran gh auth status via a synchronous, unbounded Bun.spawnSync — capable of freezing the entire single-threaded host if gh ever hangs. Its sibling ghSetupProblem(), in the same
file, already worked around this with a hand-rolled async TERM+KILL timeout — and subprocess/SPEC.md explicitly listed githubAuthStatus as known debt to migrate onto runBounded. Both probes now share
runBounded at the same 8s budget; the hand-rolled escalation logic is gone. Wire handler and web client needed no changes (already promise-based).
Centralize the duplicated raw-git e2e fixture helper
~10 e2e spec files each reimplemented their own execFileSync("git", ["-C", cwd, ...args]) wrapper (six near-identical local git(...) closures, plus two byte-identical commitFile helpers). Extracted a shared
e2e/fixtures/git.ts (git, gitQuiet, gitText, gitAs, commitFile) and migrated every call site.