refactor(git): relocate platform/gitexec under platform/git - #609
Merged
Conversation
Move the shared git-exec package and its pinned-git test helper under a single platform/git umbrella: platform/gitexec becomes platform/git/exec, and platform/gitexec/gitexectest becomes platform/git/exectest — a sibling rather than nested, so the path no longer doubles "gitexec". Package names are unchanged (gitexec, gitexectest), so this is an import-path move only: no call sites and no behavior change. It is the first step toward housing the change provider's bare-copy repo and auth plumbing alongside the shared git-exec package.
This was referenced Aug 19, 2026
behinddwalls
marked this pull request as ready for review
August 19, 2026 00:29
mnoah1
approved these changes
Aug 19, 2026
behinddwalls
added a commit
to behinddwalls/submitqueue
that referenced
this pull request
Aug 19, 2026
) ## Summary Add Env(EnvOptions) as the single place that builds a git command's environment: the always-applied scrub set, plus transport variables inherited from the parent when set (SSH agent, PATH, TLS, proxy), plus caller-supplied literals appended last so they override. Re-express Command in terms of Env so there is one composer, not two. This gives the change provider's repository and the Runway merger one source of truth to build on instead of each keeping its own copy of the scrub set and transport list. HOME is intentionally excluded from the shared transport list, since callers that isolate HOME and callers that inherit it disagree; each supplies it through Literal or Passthrough. ## Test Plan ✅ new `gitexec` unit tests: scrub set always present, transport vars inherited only when set, literals override, and `HOME` is absent from the shared transport list. Existing `Command` consumers build unchanged. ## Stack 1. uber#609 1. @ uber#610 1. uber#611 1. uber#612 1. uber#613
behinddwalls
added a commit
to behinddwalls/submitqueue
that referenced
this pull request
Aug 19, 2026
…tract (uber#611) ## Summary Move the git transport plumbing — the bare local copy, fetch, commit resolution, merge base, the git command environment — and the Auth contract out of the change provider extension into platform/git/repo, built on platform/git/exec. The provider now depends on a small Repository interface it defines and holds no os/exec and no credential handling: it parses the change URI, picks the stack baseline, reads the diff and author, and shapes the result, nothing more. Auth moves with the copy it configures, resolving the review point that authentication did not belong in the change provider. The wiring's tokenAuth now implements gitrepo.Auth and SetConfig is gitrepo.SetConfig. Repository-plumbing tests move to platform/git/repo; the provider's behavior tests stay and drive a real gitrepo.Repo through the interface. ## Test Plan ✅ `//platform/git/...`, `//submitqueue/extension/changeprovider/git/...`, `//service/submitqueue/orchestrator/server/...` green (incl. the three-step stack-baseline test); `provider.go` verified free of `os/exec`. ## Stack 1. uber#609 1. uber#610 1. @ uber#611 1. uber#612 1. uber#613
behinddwalls
added a commit
to behinddwalls/submitqueue
that referenced
this pull request
Aug 19, 2026
…ber#612) ## Summary Replace the merger's inline command environment with gitexec.Env: the isolated HOME/XDG and the pinned runtime paths stay as literals, while the scrub set and the transport variables now come from platform/git/exec, the one source of truth every git caller shares. Delete the merger's own authEnvNames and passthroughEnv. No control-flow change — the merger still owns its working-tree flow and GitRuntime; only how each command's environment is assembled moves to the shared composer. ## Test Plan ✅ full `//runway/extension/merger/git` suite green. Env-plumbing only — no control-flow change to the land path. ## Stack 1. uber#609 1. uber#610 1. uber#611 1. @ uber#612 1. uber#613
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.
Summary
Move the shared git-exec package and its pinned-git test helper under a single platform/git umbrella: platform/gitexec becomes platform/git/exec, and platform/gitexec/gitexectest becomes platform/git/exectest — a sibling rather than nested, so the path no longer doubles "gitexec".
Package names are unchanged (gitexec, gitexectest), so this is an import-path move only: no call sites and no behavior change. It is the first step toward housing the change provider's bare-copy repo and auth plumbing alongside the shared git-exec package.
Test Plan
✅
bazel build/testof the moved packages and every importer;make check-gazelleclean; grep confirms noplatform/gitexec(old path) imports remain.Stack